How To Include Custom Code

Hello,

is there a way to include code inside product description? I tried disabling the editors but it does not work. I dont want to add it to tpl. I want to include different files to various products

Anyone knows how to do this?

Description is a data field. If you want to append info, search the knowledge base for hooks and learn how to extend csc.

Description is a data field. If you want to append info, search the knowledge base for hooks and learn how to extend csc.

thank you for the reply but if you mean this page it wasnt very helpful for me. Is there an add on or a simple way to include script or html to a specific product by adding it to the description?

Look at the template for common/product_data.tpl. search for description. You can then decide which type of hook you want to use. You probably want a post hook.

Look at the template for common/product_data.tpl. search for description. You can then decide which type of hook you want to use. You probably want a post hook.

Can this method by applied to a couple of products only? I just want to include a piece of code to 10 products

Can this method by applied to a couple of products only? I just want to include a piece of code to 10 products

Yes can add special check for these products. E.g.

{if $product.product_id == 11 || $product.product_id == 12}
    YOUR CUSTOM CODE HERE
{/if}

Product IDs (11,12, etc) can be checked in the admin panel

Better make that

{if $product.product_id == 11 || $product.product_id == 12}
YOUR CUSTOM CODE HERE
{/if}

Better make that

{if $product.product_id == 11 || $product.product_id == 12}
YOUR CUSTOM CODE HERE
{/if}

Corrected. Thank you