Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Variant chart in product description.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 07-19-2006, 11:14 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

I've just changed (with the help of geckoday) the variant prices so that they are displayed with a comma, instead of a point.

This was done in /skin1/modules/Product_Options/check_options.tpl.
Changing the point on line 276 (price = top+"."+bottom.substr(1,bottom.length) into a comma results in variant prices with a comma.
But that doesn't affect the variant prices in this chart mod.
They still show a point instead of a comma...

Anybody knows where to change this?
Thanks in advance!
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #32  
Old 11-12-2006, 12:55 PM
 
kevinbrown04 kevinbrown04 is offline
 

Newbie
  
Join Date: May 2006
Posts: 3
 

Default Re: Variant chart in product description.

Quote:
Originally Posted by mffowler
I have done this for 4.1.2 and have color swatches and they also change the variant images. Perhaps I will post within the next few days. It's a hack, but it does work.

- Mike
Any chance if a version that works in 4.1.3?

Pretty Please


Kevin
__________________
Version 4.1.3
Reply With Quote
  #33  
Old 11-12-2006, 01:41 PM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default Re: Variant chart in product description.

I believe to change the prices to display correctly with a comma instead of a point when set that way in the admin change {$variants[test].price} to {include file="currency.tpl" value=$variants[test].price}
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #34  
Old 11-13-2006, 03:26 AM
 
kevinbrown04 kevinbrown04 is offline
 

Newbie
  
Join Date: May 2006
Posts: 3
 

Default Re: Variant chart in product description.

Hi
Im tring to show a variants table on the product page. I have added the following code to the skin1/customer/main/product.tpl but it doesnt work. Is there any reason this will not work in 4.1.3. I have tried with no luck.


Code:
{if $variants} <table cellspacing="1" cellpadding="0" border="0" class="chart" width="75%"> <tr class="chart_head"> <td>{$lng.lbl_sku}</td> <td>{$lng.lbl_description}</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> {/if}
Would really appriciate any help

Regards

Kevin
__________________
Version 4.1.3
Reply With Quote
  #35  
Old 11-13-2006, 08:32 AM
 
timbrrr timbrrr is offline
 

eXpert
  
Join Date: Feb 2006
Posts: 277
 

Default Re: Variant chart in product description.

Variant images was mentioned a few posts back... I'm hoping to either figure this out or find a post addressing this.... I would like to have an image box next to the options/variants that would show the variant image (instead of it changing the main image at the top) so that the customer could see what he/she was adding on to the product.
Anyone know of a post regarding this?
In the mean time, I'll keep looking and maybe start tinkering ... wish me luck
__________________
X-Cart Gold 4.6.3
Codero dedicated server
Reply With Quote
  #36  
Old 11-13-2006, 09:57 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Re: Variant chart in product description.

Refer to this thread....you can see it live here: http://www.taigayarns.net Look at a yarn product....you will see the swatch images that I added.

http://forum.x-cart.com/showthread.php?t=25100

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #37  
Old 11-14-2006, 12:23 AM
 
kevinbrown04 kevinbrown04 is offline
 

Newbie
  
Join Date: May 2006
Posts: 3
 

Default Re: Variant chart in product description.

Hi
Thanks for your replies, but what I am trying to do is show a table with;

SKU, Description and Price

of all variants for a product in a table and display it on skin1/customer/main/product.tpl thats is.

There is a version at the begining of this thread (This code is also at the top of this page in another post by me) that works, but not with 4.1.3.
Could anyone get this to work.
This one is driving me mad!!!

Thanks

Kevin
__________________
Version 4.1.3
Reply With Quote
  #38  
Old 12-04-2006, 06:42 AM
 
Simon Delicata Simon Delicata is offline
 

Newbie
  
Join Date: Oct 2006
Posts: 2
 

Default Re: Variant chart in product description.

Here's a version for 4.1.3 that I've modifed for my own benefit. The update excludes from the table, all exceptions that would otherwise be shown. It's not the prettiest code in the world and someone with more tallent could make it a bit slicker....

This goes in to customer/main/product.tpl
Code:
{* Determine if product has variants *} {if $variants} <table class=inlineSpec> {* Build table header *} <tr class="specHeader"> <td>{$lng.lbl_sku}</td> {* Loop to handle multiple variant names *} {foreach from=$product_options item=v} {if $v.is_modifier eq ''}<TD>{if $usertype eq "A"}{$v.class}{else}{$v.classtext|default:$v.class}{/if}</TD>{/if} {/foreach} <td >{$lng.lbl_stock_quantity}</td> <td >{$lng.lbl_price}</td> </tr> {* Build table rows *} {foreach item=variant from=$variants} {assign var=exception value="0"} {foreach key=ExceptionKey item=exceptionList from=$product_options_ex} {assign var=found value=0} {assign var=total value=0} {foreach item=classException from=$exceptionList} {math assign=total equation="x + 1" x=$total} {foreach name=l1 item=variantOpt from=$variant.options} {if $variantOpt.optionid eq $classException.optionid}{math assign=found equation="x + 1" x=$found}{/if} {/foreach} {/foreach} {if $found eq $total}{assign var=exception value="1"}{/if} {/foreach} {if $exception ne "1"} <tr class="specItemHeader{cycle values="1,2"}"> <td class=partnumber>{$variant.productcode}</td> {* Loop to handle multiple variants *} {foreach name=foo item=variantOpt key=key from=$product_options} {if $variantOpt.is_modifier eq ''} <TD> {foreach name=bar item=varOpt from=$variant.options} {if $varOpt.classid == $variantOpt.classid}{$varOpt.option_name}{/if} {/foreach} </TD> {/if} {/foreach} <td>{$variant.avail}</td> <td>{if $product.planer_show_price eq 'Y' }{include file="currency.tpl" value=$variant.price}{else}{if $login eq ''}Login{else}Not available{/if}{/if}</td> </tr> {/if} {/foreach} </table> {/if}
Some CSS to make it look pretty
Code:
TABLE.inlineSpec TD{ border: 1px inset; } TR.specHeader{ font-weight: bold; BACKGROUND: #EE44EE; color: white; } TR.specItemHeader1 td{ BACKGROUND: yellow; font-weight: normal; } TR.specItemHeader2 td{ BACKGROUND: lightblue; font-weight: normal; } TR td.specItemTitle{ font-weight: bold; BACKGROUND: #EEEEEE; } TR td.partnumber{ font-weight: bold; BACKGROUND: #EEEEEE; white-space: nowrap; }
__________________
X-cart 4.1.3, all but live
http://www.planer.co.uk
Reply With Quote
  #39  
Old 12-05-2006, 11:03 AM
 
andreas04031 andreas04031 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: Dallas, TX
Posts: 64
 

Default Re: Variant chart in product description.

Simon,
I tried your 4.1.3 version and it shows this
SKU16131 Dark chambray 1000 Not available

... price not availabel although the price is there... any suggestions?
Andy
__________________
X-Cart version 3.5.9 (online)
X-Cart Version 4.0.19 (online)
X-Cart Version 4.1.3 (in dev)
PHP 4.4.4
MySQL 4.1.21
Reply With Quote
  #40  
Old 12-08-2006, 12:05 AM
 
Simon Delicata Simon Delicata is offline
 

Newbie
  
Join Date: Oct 2006
Posts: 2
 

Default Re: Variant chart in product description.

Sorry Andy,

Change the line that begins :

<td>{if $product.planer_show_price eq 'Y' }

to read

<td>{include file="currency.tpl" value=$variant.price}</td>

That removes the conditional display of the prices (an internal mod I wrote)
__________________
X-cart 4.1.3, all but live
http://www.planer.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:39 AM.

   

 
X-Cart forums © 2001-2020