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)
-   -   How to use superscript in the price? (https://forum.x-cart.com/showthread.php?t=49090)

lkrivoshiev 08-10-2009 05:46 AM

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

Shamun 08-10-2009 11:35 AM

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>


lkrivoshiev 08-11-2009 08:52 AM

Re: How to use superscript in the price?
 
This works for entire price. I need to superscript only the decimal.

Christofer 08-23-2009 02:48 PM

Re: How to use superscript in the price?
 
did you get it to working at last with anyway?

lkrivoshiev 08-23-2009 10:22 PM

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.

cflsystems 08-24-2009 03:55 AM

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/

Christofer 08-24-2009 04:16 PM

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

lkrivoshiev 08-26-2009 11:35 AM

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.


All times are GMT -8. The time now is 11:24 AM.

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