Separate the decimal part of the price layout

One of the marketing tricks in sales is to be sure that the potential customer will believe that the product is cheap! or not expensive at least. So the tricks that all marketing departments use is something like this:

Attachment 35149 -- And this is a very good and correct method! -- As the customer will notice only the 19!!! number he will not think of it as 20 dolars or msth like that. Plus the number Nine-teen in human’s head is more associated to the TEEN part like four-teen or fifth-teen rather then to TWENTY.

It’s a good trick so that the customer will think that it’s around 15 dollars and he will not notice the truth that it costs 20 dollars.

The worst possible price layout is this one:

Attachment 35150 -- Imagine you have a lot of prices and you search fast… Then your eyes would look fast trough prices.. and to some people it may cause a thinking of that it values 19999 Dollars! You see the idea is correct let it be 199,99 but not 200. Cause it will remain associated for the customer as if it costs a hundred and smth then two hundreds.. You trick him. BUT! the problem is that on a web-page you have many many prices layout-ed on 1 page and they are of small font. so the guest, has a high chance to think it values 19999 $ if he gives a quick glance.. And this is very very bad.

I did not find in the back-end of magento where i could choose the option of a different way to layout the price so here is what changes i did so that it would look better I find this very useful and i would recommend it to everybody. As i am selling stuff not only on web for many years and this little secret helped me out a lot:

Go to /app/code/core/Mage/Directory/Model/Currency.php

in magento 1.8.1 you should find the following code on line 293 on any other version just search for this part of the code:

HTML Code:

public function formatTxt($price, $options=array())
    {
        if (!is_numeric($price)) {
            $price = Mage::app()->getLocale()->getNumber($price);
        }
        /**
         * Fix problem with 12 000 000, 1 200 000
         */
        $price = sprintf("%f", $price);
        return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options);
    }

and change it to

HTML Code:

public function formatTxt($price, $options=array())
    {
        if (!is_numeric($price)) {
            $price = Mage::app()->getLocale()->getNumber($price);
        }
        /**
         * Fix problem with 12 000 000, 1 200 000
         *
         * %f - the argument is treated as a float, and presented as a floating-point number (locale aware).
         * %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware).
         */
        $price = sprintf("%F", $price);
        // change /////
        $superscriptPrice = explode(",",Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options));
        $b_superscriptPrice=substr($superscriptPrice[1], 0, 2); 
        $c_superscriptPrice=substr($superscriptPrice[1], 2); 
        return $superscriptPrice[0].'<sup>'.$b_superscriptPrice.'</sup>'.$c_superscriptPrice;
        //change end ///// 
        //return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options);
    }

The html result will be <span id="product-price-x" class="price">199<sup>00</sup>Usd</span>

Plus some small css changes in style.css

HTML Code:

.price-box .price sup{
font-size: 80%;
margin-left: 2px;
}

In my case it’s JM MegaMall and it looks like this --
Attachment 35151

or also it’s good like with with a bit other css changes:

Attachment 35152

-- I find it much more attractive and clear! then just all in single line with no difference of the decimal part

Hope it helps

This question is now closed

Written By

Comments