X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Wholesale Pricing table problem (https://forum.x-cart.com/showthread.php?t=62734)

rct 02-22-2012 08:47 PM

Wholesale Pricing table problem
 
Calling all experts : How to show in "1-XX items" in the wholesale pricing table?

Quantity Price
1-11 items $5.00 <-- how to show this row ?
12-35 items $4.50 (xcart automatically generate this
36+ items $4.00 and this)

I understand that the code should be editing in product_prices.tpl, however, I am not quite sure where. I have tried to put

{$lng.lbl_singlepce} ( i have added this label just to show 1-11 items) before
{foreach from=$product_wholesale item=w name=wi}
<tr>
<td>
{strip}
{$w.quantity}{if $w.next_quantity eq 0}+{elseif $w.next_quantity ne $w.quantity}-{$w.next_quantity}{/if}
&nbsp;
{if $w.quantity eq "1"}
{$lng.lbl_item}
{else}
{$lng.lbl_items}
{/if}
{/strip}
</td>

But it wont work. Anyone can give me some ideas? Thanks in advance.

cherie 02-23-2012 02:09 PM

Re: Wholesale Pricing table problem
 
Here is a code snippet from 4.1 for customer/main/product_prices.tpl that might help you get started. We put this inside "{if $smarty.section.wi.first}":
PHP Code:

{$product.min_amount}-{$product_wholesale[wi].quantity-1}: 
{include 
file="currency.tpl" value=$product.taxed_price


rct 02-24-2012 08:30 AM

Re: Wholesale Pricing table problem
 
Thanks,



<table cellspacing="1" summary="{$lng.lbl_wholesale_prices|escape}">

<tr class="head-row">
<th>{$lng.lbl_quantity}</th>
<th>{$lng.lbl_price}{if $smarty.capture.taxdata|trim}*{/if}</th>
</tr>

{*add one pcs line*}
<tr> <td>{$lng.lbl_singlepcs} <-- my lable for lbl_singlepcs = 1-11 items ( this is permanent, hence I use a label instead)
{include file="currency.tpl" value=$product.taxed_price}</tr>


{foreach from=$product_wholesale item=w name=wi}
<tr>
<td>

{strip}


{$w.quantity}{if $w.next_quantity eq 0}+{elseif $w.next_quantity ne $w.quantity}-{$w.next_quantity}{/if}
&nbsp;
{if $w.quantity eq "1"}
{$lng.lbl_item}
{else}
{$lng.lbl_items}
{/if}
{/strip}
</td>


<td>{currency value=$w.taxed_price tag_id="wp`$smarty.foreach.wi.index`"}</td>
</tr>
{/foreach}

</table>


It showed for a bit, after I clean it up with cleanup.php, it disappear. Do i have to edit the func.js as well? If so, can you guide me?

Thanks

Ben G 09-08-2014 06:07 PM

Re: Wholesale Pricing table problem
 
Although older post, if anyone is still looking at how to get the wholesale prices table to show prices for 1-N (e.g. 1 - 11 or 1 - 6) with N responding dynamically, I have posted code for 4.6.4 in the following post :
http://forum.x-cart.com/showthread.php?p=377050#post377050

Hope it helps.


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

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