Author Topic: Block for custom producst result 0.,00$ it does not get the price right  (Read 5703 times)

Offline payamstudent

  • Newbie
  • *
  • Posts: 19
  • Karma: +2/-0
    • View Profile
Hello,

When i create a block and choose my customer products the result in the store front come with the value of 0.00$. would you please advise ?

thank you.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Thank you.

This is bug. It is fixed and will be on 1.0.2 next week.

Here is the fix:
storefront/controller/blocks/listing_block.php


@@ -290,7 +290,7 @@
 
                                }
 
-                               if(isset($item['price'])){
+                               if(isset($item['price']) && preg_match('/^[0-9\.]/',$item['price'])){
                                        $result[$k]['price'] = $this->currency->format($this->tax->calculate($item['price'], $result['tax_class_id'], $this->config->get('config_tax')));
                                }
                                $result[$k]['url'] = $this->html->getSEOURL($data_source['storefront_view_path'],'&'.$data_source['data_type'].'='.$item[$data_source['data_type']]);

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod