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

How to use superscript in the price?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-10-2009, 05:46 AM
 
lkrivoshiev lkrivoshiev is offline
 

Member
  
Join Date: Mar 2009
Posts: 16
 

Default How to use superscript in the price?

How to use http://www.w3schools.com/TAGS/tag_sup.asp in the price to look like that http://www.magentocommerce.com/?ACT=25&fid=16&aid=7126_PMGreacCDPdeSaoFx5Z0&thumb =1&board_id=1.
There is explanation for Magento here: http://www.magentocommerce.com/boards/viewthread/43075/

How to use it in X-cart 4.2.2
__________________
X-cart V4.2.3
X-RMA
X-magnifier
BCSE Product importer
...and many others
Reply With Quote
  #2  
Old 08-10-2009, 11:35 AM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: How to use superscript in the price?

skin1/customer/main/product.tpl

find these lines:
Code:
<span class="product-price-value">{include file="currency.tpl" value=$product.taxed_price tag_id="product_price"}</span> <span class="product-market-price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price tag_id="product_alt_price"}</span>


Replace with

Code:
<span class="product-price-value"><sup>{include file="currency.tpl" value=$product.taxed_price tag_id="product_price"}</sup></span> <span class="product-market-price"><sup>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price tag_id="product_alt_price"}</sup></span>
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 08-11-2009, 08:52 AM
 
lkrivoshiev lkrivoshiev is offline
 

Member
  
Join Date: Mar 2009
Posts: 16
 

Default Re: How to use superscript in the price?

This works for entire price. I need to superscript only the decimal.
__________________
X-cart V4.2.3
X-RMA
X-magnifier
BCSE Product importer
...and many others
Reply With Quote
  #4  
Old 08-23-2009, 02:48 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default Re: How to use superscript in the price?

did you get it to working at last with anyway?
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #5  
Old 08-23-2009, 10:22 PM
 
lkrivoshiev lkrivoshiev is offline
 

Member
  
Join Date: Mar 2009
Posts: 16
 

Default Re: How to use superscript in the price?

No, it did not work. To divide decimals is more complicated task. We gave up at this moment.
__________________
X-cart V4.2.3
X-RMA
X-magnifier
BCSE Product importer
...and many others
Reply With Quote
  #6  
Old 08-24-2009, 03:55 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to use superscript in the price?

This can give you an idea of how to do it
http://www.magentocommerce.com/boards/viewthread/43075/
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 08-24-2009, 04:16 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default Re: How to use superscript in the price?

lkrivoshiev have you found how to do it only on the decimal? if yes can you share please? I think it looks good
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #8  
Old 08-26-2009, 11:35 AM
 
lkrivoshiev lkrivoshiev is offline
 

Member
  
Join Date: Mar 2009
Posts: 16
 

Default Re: How to use superscript in the price?

For example, the "modifier.formatprice.php" file modification can look as follows:
Replacing the following code:
Code:
function smarty_modifier_formatprice($price, $thousand_delim = NULL, $decimal_delim = NULL, $precision = NULL) { return func_format_number($price, $thousand_delim, $decimal_delim, $precision); }

by the following one:

Code:
function smarty_modifier_formatprice($price, $thousand_delim = NULL, $decimal_delim = NULL, $precision = NULL) { $tmp = func_format_number($price, $thousand_delim, $decimal_delim, $precision); $superscriptPrice = explode(".", $tmp); return $superscriptPrice[0] . "<sup>." . $superscriptPrice[1] . '</sup>'; }

It works for me, but appears in all pages. I'd like only in products_list and product .
QT responded this :
Code:
As I wrote before, this is just an example of how to implement the "<sup></sup>" tags in X-Cart prices. Unfortunately, a lot of code should be modified in order to make X-Cart work the way you want and all the necessary changes cannot be provided as a support task. For the necessary changes implementation I would like to suggest ordering our custom development services. Our developers will implement the "<sup>"/"</sup>" tags for your prices the way you want. If you are interested, please confirm and I'll ask the project managers to estimate the customization. You'll find some details about the service at http://www.qualiteam.biz/custom_development.html

We will order this customization in the near future.
__________________
X-cart V4.2.3
X-RMA
X-magnifier
BCSE Product importer
...and many others
Reply With Quote

The following user thanks lkrivoshiev for this useful post:
missing (10-27-2010)
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 10:55 PM.

   

 
X-Cart forums © 2001-2020