How might I be able to keep my formatting from the product information page in my listings of the products? I can provide examples if I am not being clear.
How might I be able to keep my formatting from the product information page in my listings of the products? I can provide examples if I am not being clear.
From the "Similar Threads" section below: http://www.zen-cart.com/forum/showthread.php?t=34642
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I do not have a /includes/modules/my template folder. Is there a common file for this? I checked the product_listing.php in /includes/modules but that did not have the code in there. Not sure why my template didnt have a folder in here.The /includes/modules/<your_template>/product_listing.php file "cleans" html from the description. You can put it back by commenting out this bit (two places on adjacent lines) like this:
zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description(...
I'll do some hacking to see what I can find in the code.
1. The "my template" folder would be the extra folder YOU created to match your template name, to differentiate files you've customized vs original core code
Since you don't have such a folder, you have two options: (1) create it and put your edited version of the product_listing.php file in there, or (2) edit the product_listing.php file directly and deal with conflicts when you upgrade.
2. Regardless, the zen_clean_html() call is what you're looking for. You could use the developers toolkit to find all instances where it's used and then pick the relevant file in which to make your edits.
https://www.zen-cart.com/tutorials/index.php?article=38
https://www.zen-cart.com/tutorials/index.php?article=39
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Ok figured that out for the most part. Now it's still truncating the description. I've taken out the zen_trunc_string part and now my string is like this:
/*zen_trunc_string(/*zen_clean_html*//*(*/stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))/*)*//*, PRODUCT_LIST_DESCRIPTION)*/
or with the comments taken out: stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))
However it's still truncating the product description.