Jump to content

[SOLVED] How can I put the block below the information of product in the product page?


Recommended Posts

Great! That's what I want.
Thanks rocky again.

By the way, how can I add a HOOK myself?
For example, the upper red box is "Product Footer"
and the lower red box become "Product Footer 2"

So I can add any modules to "Product Footer" and "Product Footer 2"
Please help. Thank you so much!

Link to comment
Share on other sites

Unfortunately, PrestaShop doesn't have a way to add hooks from the Back Office. The only way is to edit the ps_hook table in your database using phpMyAdmin and duplicate the product footer hook there. You will then need to transplant modules into the new hook, then edit product.php and change line 210 (in PrestaShop v1.3.2) from:

'HOOK_PRODUCT_FOOTER' => Hook::productFooter($product, $category),



to:

'HOOK_PRODUCT_FOOTER' => Hook::productFooter($product, $category),
'HOOK_PRODUCT_FOOTER2' => Module::hookExec('productFooter2'),

Link to comment
Share on other sites

Hi,

I have tried, but seems can not appear the "Product Footer 2"

The following is I did according to your teaching.

1. Add a new "productfooter2" data in "ps_hook" (see attachment)


2. Edited the product.php to

'HOOK_PRODUCT_FOOTER' => Hook::productFooter($product, $category),
'HOOK_PRODUCT_FOOTER2' => Module::hookExec('productFooter2'), 




3. Added

{$HOOK_PRODUCT_FOOTER2}


above the line <!-- Customizable products --> of product.tpl



4. Added the module to the "Product footer2"(see attachment)

However, there is no module appear to the lower red box.
Please help to see any mistakes from me.
Thank you.

34235_y32yi7fzehyTudztlk60_t

34236_XCjeTvtYMyrPzVWYfDy3_t

Link to comment
Share on other sites

Hi rocky,

I did it!! (See attachment)

I've also added the code in "modules/carouselnc/carouselnc.php" bottom :

   function hookProductFooter2($params)
   {
       return $this->hookHome($params);    
   }



So, there are 2 hooks I can place the blocks!!
Nice, Thank you for your help.



[sOLVED]

34238_IPPLz03yJJbGkygkVhtb_t

Link to comment
Share on other sites

  • 2 months later...
Hi rocky,

I did it!! (See attachment)

I've also added the code in "modules/carouselnc/carouselnc.php" bottom :
   function hookProductFooter2($params)
   {
       return $this->hookHome($params);    
   }



So, there are 2 hooks I can place the blocks!!
Nice, Thank you for your help.



[sOLVED]



it tried but nothing happen? i use ps 1.3.6
i want to have 2 hook on product footer. on the new hook i want to put product link (next and prev product module and cool share module). how can i do that? please help. thank you
Link to comment
Share on other sites

Change:

'HOOK_PRODUCT_FOOTER2' => Module::hookExec('productFooter2'),



to:

'HOOK_PRODUCT_FOOTER2' => Module::hookExec('productfooter2'),




it tried but nothing happen? i use ps 1.3.6
i want to have 2 hook on product footer. on the new hook i want to put product link (next and prev product module and cool share module). how can i do that? please help. thank you
Link to comment
Share on other sites

Hello,

Could you please teach me to put the block below the information of product in the product page?
(See attachment)
I dunno there is HOOK below the details of the product or not.
Many thanks.


what module do you use under the product pic? it's the "add this" module im talking about. do you have link to download it? thanks
Link to comment
Share on other sites

Hi pepekmentul,

My Prestashop is in v1.3.2.3
Actually, the productFooter is a hook already.
You can add your modules to the productFooter hook. (the position of this hook is under the product image and above the information tab.)

For the "AddThis" block,
please download the attachment.
Thanks


Thank you SuperDuper. it works very well :-)
Link to comment
Share on other sites

×
×
  • Create New...