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

Want to include price in 2 places on product.tpl page...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-18-2005, 10:38 AM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default Want to include price in 2 places on product.tpl page...

Hello,

Several of the items I sell have different variations which affect the price. To help customers make their choices I'd like to include the price closer to the "Add to Cart" button at the bottom of the screen. I have been able to add the base price but when different options are selected only the price at the top of the page changes.

For an example see:
http://www.pipsqueakboutique.com/product.php?productid=16138&cat=258&page=1

You'll notice that the base price of $17 changes for the top price, but not the second one.

Thanks,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #2  
Old 02-18-2005, 12:12 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Make sure you copy the WHOLE price blurb of code, and not just the actual price portion. There is code in there that ties in to the product options.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-18-2005, 04:14 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

The code that I copied and pasted is:

Code:
{if $product.taxed_price ne 0 || $variants ne ''} <FONT class="ProductDetailsTitle"><SPAN id="product_price">{include file="currency.tpl" value=$product.taxed_price}</SPAN></FONT> <FONT class="MarketPrice"> <SPAN id="product_alt_price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</SPAN></FONT> {if $product.taxes} {include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if} {else} <INPUT type="text" size="7" name="price"> {/if}

There's nothing else around it related to pricing. Above is the title and below it starts with the upselling module.

Any idea what I'm missing?

Thanks,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #4  
Old 06-22-2005, 07:24 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Hi, just an update on this as I notice you never got it working (looking at your site). I was in the same situation but got X-cart to help me. From another posting I made today:

OK, got X-cart to help me with this.

in customer/main/product.tpl change the second instance of the price to use a separate span tag, in this case product_price2:

Code:
{$lng.lbl_price}: <font class=ProductDetailsTitle><SPAN id="product_price2">{include file="currency.tpl" value=$product.price}</span>


and in /modules/Product_Options/check_options.tpl add this:

Code:
// Update price2 if(document.getElementById('product_price2')) document.getElementById('product_price2').innerHTML = currency_symbol+price_format(price, 2);

underneath // Update price so it looks like this:

Code:
// Update form elements // Update price if(document.getElementById('product_price')) document.getElementById('product_price').innerHTML = currency_symbol+price_format(price, 2); // Update price2 if(document.getElementById('product_price2')) document.getElementById('product_price2').innerHTML = currency_symbol+price_format(price, 2);

Works for me!

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #5  
Old 06-22-2005, 07:40 AM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Thank you so much Dan, worked perfectly!

I sent 2 messages to the X-Cart team about how to do this, or for a price to have them do it, and both of them were deleted with no response. I'm glad you were able to get an answer from them. Thank you very much for sharing it!

All the Best,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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 10:20 AM.

   

 
X-Cart forums © 2001-2020