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

Wholesale Pricing table problem

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-22-2012, 08:47 PM
 
rct rct is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 89
 

Default 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.
__________________
JOHN - v.5.3.X biz, X-payment 3.X
Reply With Quote
  #2  
Old 02-23-2012, 02:09 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default 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
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
  #3  
Old 02-24-2012, 08:30 AM
 
rct rct is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 89
 

Default 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
__________________
JOHN - v.5.3.X biz, X-payment 3.X
Reply With Quote
  #4  
Old 09-08-2014, 06:07 PM
 
Ben G Ben G is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 100
 

Default 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.
__________________
Ben
X-Cart 4.6.6 Gold Plus - lots of modules
X-Cart 4.7.9 Gold Plus - lots of modules
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 03:55 AM.

   

 
X-Cart forums © 2001-2020