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

Product Modifier Mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-22-2007, 01:46 AM
  scoobie's Avatar 
scoobie scoobie is offline
 

Advanced Member
  
Join Date: Dec 2006
Location: Sydney
Posts: 84
 

Default Product Modifier Mod

In my flower website, I have several product Modifiers as options on each of the flowers. For example with each floral arrangement, I added dropdowns for chocolates, balloons, teddy bears etc. In each dropdown, the first entry was always the word Select with no value. If the customer hits the Add to cart button, every option regardless of being selected would appear in the cart and subsequent invoice. If the options were left unchanged, they would show as:-

Chocolates: Select
Balloons: Select
Teddy Bears: Select

To ensure only the options that were changed appear in the cart and invoice, you need to edit the file modules/Product_Options/display_options.tpl

Replace

{foreach from=$options item=v}
{$v.class}: {$v.option_name}
{/foreach}

with:

{foreach from=$options item=v}
{if $v.option_name ne "Select"}
{$v.class}: {$v.option_name}
{/if}
{/foreach}

also, replace

{foreach from=$options item=v}
<tr>
<td>{$v.class}:&nbsp;</td>
<td>{$v.option_name}</td>
</tr>
{/foreach}

with:

{foreach from=$options item=v}
{if $v.option_name ne "Select"}
<tr>
<td>{$v.class}:&nbsp;</td>
<td>{$v.option_name}</td>
</tr>
{/if}
{/foreach}


This code was successfully tested on version 4.1.4. Anyone wishing to view this can see it at www.floriart.com.au/shop
__________________
X-CART 4.1.8 (Add-Ons: onSale, CDSEO, AOM, Thickbox)
PHP 4.4.4
SQL 4.1.21
Linux O/S
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 04:00 AM.

   

 
X-Cart forums © 2001-2020