AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: payamstudent on May 24, 2012, 02:55:44 AM

Title: Block for custom producst result 0.,00$ it does not get the price right
Post by: payamstudent on May 24, 2012, 02:55:44 AM
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.
Title: Re: Block for custom producst result 0.,00$ it does not get the price right
Post by: abantecart on May 24, 2012, 10:49:37 AM
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']]);