Product Variants in Product Details Table (4.1.x)
1 Attachment(s)
If anyone needs to display product variants to a customer (Available sizes, colors, etc.), then I have a small bit of code that will do just that.
It will also grab the {$v.class} which will display a title (Like color or size) and can easily be modified to your liking. It also has the smarty variable that doesn't display an item for the last array object (ie. a comma). There's an image screenshot of a sample I tested with 4.1.9. It should work with 4.1.x versions of X-Cart. It will display multiple variables and display them for all available product variants (ie. 1. Colors and 2. Sizes). In product.tpl, find the 'Product Details' table: Code:
<tr><td colspan="2"><b><font class="ProductDetailsTitle">{$lng.lbl_details}</font></b></td></tr> Code:
{foreach from=$product_options item=v} Let me know if it can be improved or how you modified it's use with additional functionality. You may need to remove my use of the word "Available <Class>s:" and can better title the variants using the v.class itself. This is just an easy way to say 'Available Colors:" and so forth. - Mike |
Re: Product Variants in Product Details Table (4.1.x)
Probably a wildshot but can you get this to run in the standard products listing in a category, possibly just under the short description?
|
All times are GMT -8. The time now is 08:03 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.