Post by daniGo » Wed Apr 06, 2016 4:50 pm

this should work for OC 2.0.1.1 and OC 2.2

Attachments

this should work for OC 2.0.1.1

this should work for OC 2.2

Last edited by daniGo on Thu Apr 07, 2016 3:39 am, edited 2 times in total.

http://www.gombac.si


Active Member

Posts

Joined
Wed Mar 20, 2013 4:49 pm
Location - Slovenia

Post by supak111 » Wed Apr 06, 2016 6:06 pm

Just tested it on OC2.0.1.1, I dont get any errors but it does not work either. Cart still using the SPECIAL price always.
.
.
.

Newbie

Posts

Joined
Fri Feb 13, 2015 12:09 pm

Post by daniGo » Wed Apr 06, 2016 6:39 pm

The cart use special price only if is lower than quantity discount price.

Default:

Code: Select all

$price = $product_query->row['price'];

if ($product_discount_query->num_rows) {
  $price = $product_discount_query->row['price'];
}

if ($product_special_query->num_rows) {
  $price = $product_special_query->row['price'];
}
Changed:

Code: Select all

$price = $product_query->row['price'];

if ($product_discount_query->num_rows && ($product_discount_query->row['price'] < $price)) {
  $price = $product_discount_query->row['price'];
}

if ($product_special_query->num_rows && ($product_special_query->row['price'] < $price)) {
  $price = $product_special_query->row['price'];
}
Always took the lower price, at least for me it works.

http://www.gombac.si


Active Member

Posts

Joined
Wed Mar 20, 2013 4:49 pm
Location - Slovenia

Post by supak111 » Thu Apr 07, 2016 3:06 am

YEEEESS! I figure it out, thanks for the OCMOD, this has been driving me nuts for over a year.

You just make a tiny simple mistake. OC 2.0.1.1 atleast doesn't have:

<file path="system/library/cart/cart.php"> change to <file path="system/library/cart.php">
.
.
.

Newbie

Posts

Joined
Fri Feb 13, 2015 12:09 pm

Post by taggsladder » Wed Jul 13, 2016 12:34 am

daniGo wrote:this should work for OC 2.0.1.1 and OC 2.2
Thank you :)

Newbie

Posts

Joined
Tue Sep 30, 2014 10:20 pm

Post by Vilda » Fri Jul 15, 2016 2:50 pm

Hello, I have the same problem. Please do you have it for opencart 1.5.6.4? I am able to pay for it.

Newbie

Posts

Joined
Fri Jul 15, 2016 2:46 pm

Post by kelklope » Sat Aug 13, 2016 10:26 pm

Vilda wrote:Hello, I have the same problem. Please do you have it for opencart 1.5.6.4? I am able to pay for it.
Did you try the solution of daniGo..it worked for me

Noeud papillon en bois - Lunette de soleil en bois - Montre en bois

Islamic library - Librairie islamique

Cigarette electronique prix - E liquide - Joyetech - Kangertech
- E cigarette - Alfaliquid - Liquideo


Newbie

Posts

Joined
Sat Aug 13, 2016 9:07 pm


Post by mazlie » Fri Aug 04, 2017 3:56 pm

Please make it for Opencart 2.3.2, I am willing to pay

Newbie

Posts

Joined
Tue Apr 09, 2013 11:17 am

Post by Mirbrou » Sun Aug 06, 2017 3:57 am

Hello, Mazzlie,

I installed version 2.2 and it works very well ! :)

https://cotonflanelle.com in OC2.0.1.1
Kingstorepro - ThwmwGlobal
Advanced SEO - Webkul
Product Preorder Pro - Webkul
Webkul Quickbook Connector - Webkul
Customers Also Viewed / Purchased
opencart-2-x-export-import-multilingual-3-12 - J. Neuhoff


Newbie

Posts

Joined
Tue Jun 27, 2017 6:25 am
Who is online

Users browsing this forum: No registered users and 15 guests