0

I want to show random products in particular category in my home page, i tried this code http://www.magikcommerce.com/…/random-products-magento-hom…/ It working, but product price have extra 4 digits like : 1900.0000 how to remove last 4 digits can you help me ?

I tried magento default price module it remove last 4 digits, But it repeat single price to all products.

My working website : http://m.machinetoolsemart.com/ Please reply me as soon as possible

1
  • Thanks for your co-operation, I got a solution. Thanks Magento.stackexchange Apr 11 '16 at 6:37
0

You need to replace from $displayed_products[$random_products[$i]]->getPrice() to Mage::helper('core')->currency($displayed_products[$random_products[$i]]->getPrice(), true, false);

3
  • @Vijayakumar can you please tell me reason for accepting another answer while i have answer it first by using your code. anyway I glad to hear that my code is working :)
    – Arunendra
    Apr 11 '16 at 6:42
  • Sorry for that, i tried Qaisar Satti given codes and your codes, But your code give the result as i expected, But i got your code last 10 min ago. If i got your at earlier i can fix that bug earlier. Anyway Thanks for that. Apr 11 '16 at 6:46
  • @Vijayakumar if you talking about time then you can see my answer time and his comment time any way thanks for your time
    – Arunendra
    Apr 11 '16 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.