Display custom contents on "order cofirmation", "account creation confirmation" and "contact form submission"


Hi Milos,

Hope you're well.

Just wondering if I can pick your brain...

What is the best way to add Javascript code to

1) the ‘thank  you’ page that follows or completes a purchase.
2) the ‘thank  you’ page that follows or completes an account creation
3) the ‘thank  you’ page that follows or completes a Contact Us submission

how to create custom contents for "Thank you" pages in PrestaShop


Hello Paul
1) the ‘thank  you’ page that follows or completes a purchase.
An easiest way will be the module that allows to put custom contents to "displayOrderConfirmation" hook so-called "orderConfirmation". Html box pro allows to put contents there.

2) the ‘thank  you’ page that follows or completes an account creation
PrestaShop does not have this kind of page, customer after register is redirected to "my account" page.
It is possible to do this with modification of my-account.tpl.  In html box pro module create custom hook named "displayAfterRegister"
then in your my-account.tpl (theme directory) change code:
{if isset($account_created)}
 <p class="alert alert-success">
  {l s='Your account has been created.'}
 </p>
{/if}

to:
{if isset($account_created)}
 <p class="alert alert-success">
  {l s='Your account has been created.'}
 </p> {hook::exec('displayAfterRegister')}
{/if}

Now with html box pro module you will be able to build custom contents for "thank you" purposes :)

3) the ‘thank  you’ page that follows or completes a Contact Us submission
The same as previously prestashop does not have a "thank you" page for contact form. In this case it is necessary to add custom hook to htmlboxpro named "displayAfterContactUsSubmission". Then in your theme file contact-form.tpl right after this:
      <h3 class="page-subheading">{l s='send a message'}</h3>
      <div class="clearfix">
add:
{if isset($confirmation)} {hook::exec('displayAfterContactUsSubmission')}
{/if}

After this you will be able to build custom contents for "Thank you" contact form submission :)



Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment