X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Variant chart in product description. (https://forum.x-cart.com/showthread.php?t=14705)

dfawdon 12-08-2006 12:51 AM

Re: Variant chart in product description.
 
This is a great mod which I have being using for quite some time, thanks sstillwell !!
I wanted to have the table heading to display the class value instead of the options label, so added a small bit

Full code:

Code:

<!-- Variants table -->
{foreach from=$variants item=v}
{cycle name="classes" values=""}
        {foreach from=$v.options item=o}
        {/foreach}
        {/foreach}
{if $variants}
<table cellspacing="1" cellpadding="0" border="0" class="chart" width="100%">
<tr class="chart_head">
  <td>{$lng.lbl_sku}</td>
  <td>{$o.class}</td>
  <td>{$lng.lbl_our_price}</td>
</tr>
{section name=test loop=$variants}
<tr class="{cycle values="chart_dark,chart_light"}">
  <td>{$variants[test].productcode}</td>
{foreach item=item key=key from=$variants[test].options}
  <td>{$item.option_name}</td>
{/foreach}
  <td>ё{$variants[test].price}</td>
</tr>
{/section}
</table>
<br />
{/if}


whsu716 12-14-2006 08:42 AM

Re: Variant chart in product description.
 
Hey all!

Thanks for the mods - this is great.

I do have a simple logical question though - how would I go about ignoring the first option.

This is because for my first option, I always have 'Choose your color...' or whatever the option is.

Thanks!

jeff819 12-21-2006 04:23 PM

Re: Variant chart in product description.
 
I'm using the provided code and it is working great. One issue though...how do I sort columns in the table? After I setup the product options and variants, it puts everything in an order which I would like to change, but I can't figure out how. I am unable to sort from Admin, so I'm assuming/hoping it can be done somewhere in the code.

Any suggestions are greatly appreciated...

Jeff

HWT 03-21-2007 07:33 AM

Re: Variant chart in product description.
 
Thanks to everybody who has contributed to this mod! I've been using it successfully for over a year now, but I just ran into situation where it ended up displaying a mess.

I have tables which come in 6 colors and 3 heights, which result in 18 unique SKU's. So, I happily set it up as a variant for color and one for height. The result...an 18 SKU long table!!!

To get rid of it, I simply used:

Code:

{if $product.categoryid == xxx}
{else}
<!-- Variants table -->
 
(. . .variants table code . . .)
 
<!-- end Variants table -->
{/if}


where xxx is the category id number

The result is the complete removal of the variant tables from the products in a specific category.

This little bit of code is, of course, not specific to this mod, but I thought some might find it useful if they're running into the same issue.

balinor 07-26-2007 09:51 AM

Re: Variant chart in product description.
 
Anyone managed to get some actual add to cart or quantity boxes in here? Would be great to order directly from the chart instead of still having to use the drop-down!

Jayk 07-26-2007 10:03 AM

Re: Variant chart in product description.
 
Quote:

Originally Posted by balinor
Anyone managed to get some actual add to cart or quantity boxes in here? Would be great to order directly from the chart instead of still having to use the drop-down!


That would indeed be a nice feature to have.

Jason

balinor 07-26-2007 10:55 AM

Re: Variant chart in product description.
 
Working on getting it coded up now. Will share with the community once it is working.

kalonji 08-10-2007 11:06 PM

Re: Variant chart in product description.
 
Quote:

Originally Posted by balinor
Anyone managed to get some actual add to cart or quantity boxes in here? Would be great to order directly from the chart instead of still having to use the drop-down!


Yes..this would be a nice feature to have...Would this work on 4.1.8?

hhiker 09-08-2007 07:12 PM

Re: Variant chart in product description.
 
This thread worked great! :)

http://forum.x-cart.com/showthread.php?t=33019&highlight=radio+buttons

intel352 02-28-2008 05:03 AM

Re: Variant chart in product description.
 
Hey everyone, intel352 here, I'm the developer that created the Variant Chart for Padraic's clients, Discussed in this thread

I've now finished up a packaged version of the module, available for purchase. I've got screenshots and info here: http://forum.x-cart.com/showthread.php?p=206012

If you have any questions, please post in the thread that I just linked to

Cheers!


All times are GMT -8. The time now is 11:10 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.