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

Ranged variant pricing display on products.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-12-2004, 10:40 PM
 
wishbringer wishbringer is offline
 

Member
  
Join Date: Sep 2004
Posts: 10
 

Default Ranged variant pricing display on products.tpl

I would like to modify products.tpl (I'm using the two-column version) so that instead of displaying "Market Price" and "Our Price" and all that, instead it looks at the minimum variant price and the maximum variant price (there's four variants per product) and displays this in a range, like:

"Priced from $11 to $21"

Does anyone have an idea of how to accomplish this?
__________________
http://www.ilandrama.com
Reply With Quote
  #2  
Old 11-18-2004, 07:58 AM
 
wishbringer wishbringer is offline
 

Member
  
Join Date: Sep 2004
Posts: 10
 

Default

Anyone have any idea? :>
__________________
http://www.ilandrama.com
Reply With Quote
  #3  
Old 12-01-2004, 10:48 AM
 
jtoth@caimen.com jtoth@caimen.com is offline
 

Newbie
  
Join Date: May 2004
Posts: 3
 

Default Not really a solution, but what I did

I modified the products template and added a language variable to display "Priced From" instead of "Our Price" if the product has options.

It's not really a great solution, I was looking for the same thing you were, but I kept digging deeper and deeper and I was going to end up modifying files I didn't want to lose on the next upgrade process...

Here's my code: ( search for $lng.lbl_our_price for placement)

Code:
{* CAIMEN MOD - Show "Priced From" if variants are there *} {if $active_modules.Product_Options ne ""}{$lng.lbl_priced_from}{else}{$lng.lbl_our_price}{/if} {* /CAIMEN MOD *}

I also added it in products_t.tpl for the featured items...
Reply With Quote
  #4  
Old 01-07-2005, 10:45 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default

I tried...

Code:
{if $active_modules.Product_Options ne ""} From {/if}

...in products_t.tpl , but it displays 'from' whether the product has options or not.

I also tried...

Code:
{if $product_options ne ""}

...but that doesn't work properly either. Anyone got this to work?
__________________
xcartmods.co.uk
Reply With Quote
  #5  
Old 04-15-2005, 01:09 PM
 
sportruck sportruck is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 70
 

Default

In customer/main/products_t.tpl, change this:

Code:
{$lng.lbl_our_price}:

To this....

Code:
{if $products[product].is_variant eq Y}{$lng.lbl_priced_from}{else}{$lng.lbl_our_price}{/if}:

Also, create the new langauge entry under Labels called lbl_priced_from and use whatever text you want, such as "Priced from" or "Starting at", or you could just enter the text in the template if you aren't using multiple languages.
Reply With Quote
  #6  
Old 05-15-2005, 04:26 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default

Thanks for posting that bit of code - worked fine for me when I used it in products.tpl.

Was wondering though, if you use product prices including tax (VAT) how do you get the Variants to display including tax? All other prices work and when you add a product with Variants to the cart, the prices is fine, but in Variants it doesn't work???
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
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 06:59 AM.

   

 
X-Cart forums © 2001-2020