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)
-   -   Better display of wholesale pricing table (https://forum.x-cart.com/showthread.php?t=7885)

gardel 06-03-2004 07:57 AM

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

shan 06-03-2004 08:13 AM

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}


gardel 06-03-2004 08:58 AM

Works perfectly. Many thanks.

adpboss 06-28-2004 03:12 PM

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

Many thanks Shan, so obvious once you see working code. :)


All times are GMT -8. The time now is 12:28 AM.

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