This mod correctly displays discounted prices with products that have special prices.
If the special price is lower than one of the discounted prices, that discounted price is hidden so as not to confuse the user and so the correct price is shown in the cart.
Tested on 1.5.x
It worked perfect up to 1.5.6. When I upgraded to 1.5.6.1 my product pages suddenly went blank. Remove this vqmod/xml file makes product pages OK again, but the option to have Sale price and Quantity disappeared.
I have tried to figure out how to rebuild this mod to work with 1.5.6.1 but I´m lost. Anyone out there with a solution?
I have tried to figure out how to rebuild this mod to work with 1.5.6.1 but I´m lost. Anyone out there with a solution?
Webbo wrote:Please could you bring this vqmod out as an extension for OC2.0.1.1 or possibly modify this version
Please....
it already does work with 2.0 ...did you try it?
remove this from the file for 2.0
<file name="catalog/controller/product/product.php">
<operation>
<search position="replace" offset="5"><![CDATA[ foreach ($discounts as $discount) {]]></search>
<add><![CDATA[ foreach ($discounts as $discount) {
if((float)$product_info['special']){
if($product_info['special']>$discount['price']){
$this->data['discounts'][] = array(
'quantity' => $discount['quantity'],
'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax')))
);
}
}else{
$this->data['discounts'][] = array(
'quantity' => $discount['quantity'],
'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax')))
);
}
}]]></add>
</operation>
</file>
I have tried this unchanged in v2.2.0.0 and it gives errors on the product page.
I removed the lines of code as indicated, and the errors are gone, but it does not show the proper discounted price.
FYI, I have a Special price set @ $15.95 and a Discounted price set at $14.975 for quantity 2 or more.
Even with this modified vqmod, the price still shows $15.95 with qty 2 or more in the shopping cart.
I wish this could be fixed because I really need this basic feature to work.
Thanks in advance for anyones's help.
I removed the lines of code as indicated, and the errors are gone, but it does not show the proper discounted price.
FYI, I have a Special price set @ $15.95 and a Discounted price set at $14.975 for quantity 2 or more.
Even with this modified vqmod, the price still shows $15.95 with qty 2 or more in the shopping cart.
I wish this could be fixed because I really need this basic feature to work.
Thanks in advance for anyones's help.
Initially, this vqmod did not work for me on v2.2.0.0, even after removing the code as indicated above. However, after reviewing the code, I noticed that in line 6, the path to cart.php was incorrect for my installation.moddish wrote:Webbo wrote:Please could you bring this vqmod out as an extension for OC2.0.1.1 or possibly modify this version
Please....
it already does work with 2.0 ...did you try it?
remove this from the file for 2.0
<file name="catalog/controller/product/product.php">
<operation>
<search position="replace" offset="5"><![CDATA[ foreach ($discounts as $discount) {]]></search>
<add><![CDATA[ foreach ($discounts as $discount) {
if((float)$product_info['special']){
if($product_info['special']>$discount['price']){
$this->data['discounts'][] = array(
'quantity' => $discount['quantity'],
'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax')))
);
}
}else{
$this->data['discounts'][] = array(
'quantity' => $discount['quantity'],
'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax')))
);
}
}]]></add>
</operation>
</file>
Code: Select all
<modification>
<id>Fix Discounts wtih Specials</id>
<version>1.0</version>
<vqmver>1.2.3</vqmver>
<author>uksb</author>
<file name="system/library/cart.php">
I had to change the path to include my subdirectory:
Code: Select all
<modification>
<id>Fix Discounts wtih Specials</id>
<version>1.0</version>
<vqmver>1.2.3</vqmver>
<author>uksb</author>
<file name="system/library/cart/cart.php">
After removing the code as indicated above, and updating the path to include my subdirectory, I can now use Special Pricing and Discount Pricing at the same time in v2.2.0.0.
Who is online
Users browsing this forum: No registered users and 42 guests