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

Better display of wholesale pricing table

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 06-03-2004, 07:57 AM
 
gardel gardel is offline
 

Member
  
Join Date: May 2004
Location: San Francisco
Posts: 20
 

Default Better display of wholesale pricing table

In its default state, xcart's product pages display quantity discounts horizontally:

Quantity : 10-19 20+
Price : $8.99 $7.99

This is fine if you only have two price breaks. Add a third or more, and it tends to break the tables on the whole page (at least in my design).

I would like to change the quantity discount table to a vertical one:

Quantity Pricing
10-19 $8.99
20-49 $7.99
50-99 $6.99
100+ $5.99

I looked at product.tpl, but can't pinpoint the code section I would need to modify. Can a kind soul tell me the file(s) and section(s) that need to be modified?

tx
Reply With Quote
  #2  
Old 06-03-2004, 08:13 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

this is for 3.5.8 but should work ok with other versions

open up customer/main/product_prices.tpl and replace the contents with this

Code:
{* $Id: product_prices.tpl,v 1.5 2002/10/21 07:06:43 zorg Exp $ *} {if $product_wholesale ne ""} <table border="0" cellspacing="2" cellpadding="3"> <tr bgcolor="#EEEEEE"> <td>{$lng.lbl_quantity}:</td> <td>{$lng.lbl_price}</td> </tr> {section name=wi loop=$product_wholesale} <tr> <td>{$product_wholesale[wi].quantity}{if $smarty.section.wi.last}+{else}-{$product_wholesale[wi].next_quantity}{/if}{if $product_wholesale[wi].quantity eq "1"}{$lng.lbl_item}{else}{$lng.lbl_items}{/if} </td> <td>{include file="currency.tpl" value=$product_wholesale[wi].price}</td> </tr> {/section} </table> {/if}
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 06-03-2004, 08:58 AM
 
gardel gardel is offline
 

Member
  
Join Date: May 2004
Location: San Francisco
Posts: 20
 

Default

Works perfectly. Many thanks.
Reply With Quote
  #4  
Old 06-28-2004, 03:12 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Just used this, I kept getting errors with my own code.

Many thanks Shan, so obvious once you see working code.
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 07:29 PM.

   

 
X-Cart forums © 2001-2020