I want to add a text block under the "Add to Cart" button to all products in a category.
Is there some easy solution to achieve this?
I want to add a text block under the "Add to Cart" button to all products in a category.
Is there some easy solution to achieve this?
Enable the My changes module, create the following file:
design/themes/YOUR_THEME/templates/addons/my_changes/hooks/products/product_detail_bottom.pre.tpl
put your content to this file and clear the cache then
Thank you for the instruction. Is there any way to show this to only a few products in a specific category, not all products?
You can use the promo text field to show additional text. There is an ability to export and import it. The content of the new file should be
{if $product.promo_text}{$product.promo_text nofilter}{/if}
Note that it will be required to remove the same code from the product template:
design/themes/YOUR_THEME/templates/blocks/product_templates/default_template.tpl
I want to add a text block under the "Add to Cart" button to all products in a category.
Is there some easy solution to achieve this?
Hi I just find your post ghostrider by looking for something I actually wanted to find out but since I am here, what may I ask where or are you trying to accomplish with this block ? Is it a universal kind of text you want to appear for all products related to one specific category or just a text block that can be individually filled for each individual product ?
Hi I just find your post ghostrider by looking for something I actually wanted to find out but since I am here, what may I ask where or are you trying to accomplish with this block ? Is it a universal kind of text you want to appear for all products related to one specific category or just a text block that can be individually filled for each individual product ?
Use promo text. It can be exported and imported for specific products
Hi Gurus,
Can anyone please advise me how I can get the title and the rest of the information take full width to the right and the promo text to appear under the title as per the attached screenshot?
Cheers!
[attachment=13392:promo and title.jpg]
You should change the following template
design/themes/THEME/templates/blocks/product_templates/default_template.tpl
For example, move code from the products:main_info_title hook to separate HTML block with SMARTY support and locate it above the Main content block
You should change the following template
design/themes/THEME/templates/blocks/product_templates/default_template.tpl
For example, move code from the products:main_info_title hook to separate HTML block with SMARTY support and locate it above the Main content block
Thanks for your reply. I cant seem to make it work. Either nothing happens when I move the code around or the page becomes UNAVAILABLE. Here is the code:
Thanks for your reply. I cant seem to make it work. Either nothing happens when I move the code around or the page becomes UNAVAILABLE. Here is the code:
How do you add new code? Please provide us with the peace of code you added
How do you add new code? Please provide us with the peace of code you added
I didn't add anything. I just moved some parts of the code. Can you please show me how its done, I'm obviously not that good with it :(
Hi all, I'd like to move my description up under the price, which is very similar to this. I've had a good luck through templates but I cant seem to get any changes to take effect.
Thanks
Lee
Hi all, I'd like to move my description up under the price, which is very similar to this. I've had a good luck through templates but I cant seem to get any changes to take effect.
After template is changed, do not forget to clear cache or delete the var/cache directory manually
I know about clearing the cache thanks, the problem is finding exactly which template to start editing and how to prevent it being overwritten after an update. I've just been adding some text to various templates and checking just to try and ID which template is which and still can't find the correct one. The Bright Theme templates don't have the product detail template in there to start with?
Lee
I know about clearing the cache thanks, the problem is finding exactly which template to start editing and how to prevent it being overwritten after an update. I've just been adding some text to various templates and checking just to try and ID which template is which and still can't find the correct one. The Bright Theme templates don't have the product detail template in there to start with?
Check parent theme (design/themes/responsive for the bright theme)
You should change the following template
design/themes/THEME/templates/blocks/product_templates/default_template.tpl
For example, move code from the products:main_info_title hook to separate HTML block with SMARTY support and locate it above the Main content block
Thanks for your help, I was able to make the required changes.
My next question however, is how to keep this template safe from getting overwritten when the CS-Cart upgrades?
Just override the products:main_info_title hook with my changes module (for example, add empty div tag). Changes in the default_template.tpl file are not required in this case
design/themes/YOUR_THEME/templates/addons/my_changes/hooks/products/main_info_title.override.tpl
You can just use an html comment rather than an empty div so it's clear. An override just looks for html content after whitespace is removed. If there is none, then the original hook block will be used. If it's non-zero, then that content will be used.
I'd suggest you use a comment similar to:
This makes it clear to anyone doing a code inspection or other review.
Thanks for your help guys!