Post by ExtremeLeadProgram » Sat Jul 09, 2011 9:37 am

It seems that if you use the "Special" section to lower a price that quantity discounts are ignored.

Try: http://extreme-mlm-leads.com/opencart2/ ... -mlm-leads

No matter what quantity you try to add to cart it charges the $1.27 price. It won't charge the $1.19 or $0.82 for quantities of 100 or 270 respectively.

However, if I remove the special price of $1.27 it will then charge the $1.19 or $0.82 for those higher quantities. Not sure where to go to fix this, any help would be appreciated.


Posts

Joined
Sat Jul 09, 2011 4:59 am

Post by uksitebuilder » Sat Jul 09, 2011 4:41 pm

Maybe this will help

open: system/library/cart.php

replace

Code: Select all

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

Code: Select all

				if ($product_special_query->num_rows) {
					if($product_discount_query->num_rows&&$product_discount_query->row['price']<=$product_special_query->row['price']){
						$price = $product_discount_query->row['price'];
					}else{
						$price = $product_special_query->row['price'];
					}
				}
open: catalog/controller/product/product.php

replace:

Code: Select all

			foreach ($discounts as $discount) {
				$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')))
				);
			}
with:

Code: Select all

						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')))
					);
				}
			}
or if you use vQmod to save from core file overwriting:
Last edited by uksitebuilder on Sat Jul 09, 2011 5:30 pm, edited 1 time in total.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Sat Jul 09, 2011 5:10 pm

We could go further than the above.

For example

Product has Main Price 3.00
Product has discount buy 10 for 2.00
product has Special Price 1.00

Although with the above mod, the correct price of 10.00 will be added to the cart if the user buys 10 quantity (because of the special price being lower than the discount price)
The display on the product page will look confusing to the user as it will still list the discounts

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Sat Jul 09, 2011 5:31 pm

OK fixed that too and changed code in my edit post above - vqmod file also updated

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Daniel » Sat Jul 09, 2011 8:27 pm

there is no bug here. you need to be careful that the discount and specials do not overlap each other.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Xsecrets » Sat Jul 09, 2011 11:21 pm

Daniel wrote:there is no bug here. you need to be careful that the discount and specials do not overlap each other.
I may not be a bug, but it's certainly limitation of the system. And since someone has gone to the trouble to overcome the limitation it probably wouldn't hurt to add it to future versions.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Daniel » Mon Jul 11, 2011 1:10 am

its not a limitation. its how the system should work.

the system is very flexible it has a massive discount system with coupons, price breaks, special offers. if you don;t set them correctly they don't work how they should.

don't use special prices with quantity discounts they don't mix well.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by uksitebuilder » Mon Jul 11, 2011 1:36 am

Daniel wrote:don't use special prices with quantity discounts they don't mix well.
Exactly it is a limitation in so much as the use of special prices with discounts is limited to not working.

But hey, it is your system, so it is up to you.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by emmetje » Tue Jul 12, 2011 3:31 am

uksitebuilder wrote:OK fixed that too and changed code in my edit post above - vqmod file also updated
Thank you for sharing the code with us, veeery usefull!!

User avatar
New member

Posts

Joined
Wed Jun 22, 2011 2:18 am

Post by uksitebuilder » Sun Jul 31, 2011 6:27 am

Update to the code above.

It came to my attention that the previous vqmod file worked only to an extent.

If you have used it, please replace with this new file and clear your vqmod/vqcache

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by darrengould » Wed Aug 03, 2011 3:54 pm

I had this problem and it is definitely a problem because they should work together to be right.

I have a product that is on special offer for one and also discounted for three, six, and twelve but you don't want a visitor to see just a price for one bottle. you want them to see the normal price and the special price as it is far more effective.

I have had to put my special price as the normal price which diminishes the sale factor becasue a visitor has absolutely no idea the product is on special and it also won't show up in the specials list unless it does.

If you then have a discount on three, six and twelve you need to be able to show them as dicounts and your initial price as a special.

Sorry but this is a problem and does need fixing and anyone that sells of a website not designs one will know that the effectiveness of the specials, discounts is completely lost if you have to do it the way I described.

The only quick way round this that I can see is to allow the specials to have the option to put a quantity in so you can in effect create discounts using the specials although again this could create problems with your specials list as it could be massive.

New member

Posts

Joined
Fri Mar 25, 2011 9:07 pm

Post by eric1998 » Sat Aug 06, 2011 12:27 am

Good Work
UKSB

Thanks

http://wm-distribution.com ---- OC 1.5.1.3


User avatar
New member

Posts

Joined
Sat Apr 02, 2011 10:39 pm

Post by mwd » Sun Nov 06, 2011 9:31 pm

uksitebuilder wrote:Update to the code above.

It came to my attention that the previous vqmod file worked only to an extent.

If you have used it, please replace with this new file and clear your vqmod/vqcache
uksb_discount_with_specials.xml
Thank you so much, uksb!
I didn't realize the sale price didn't work with quantity discounts until I got emails from customers asking for a refund.

Your mod did the trick!
Great work.

Use it? Like it? Want to support it but don't know how? Send a donation to show your appreciation.
Daniel's PayPal address - donate@opencart.com
Qphoria's Paypal address - qphoria@gmail.com


mwd
Active Member

Posts

Joined
Sat Jan 08, 2011 11:40 pm

Post by i2Paq » Wed Feb 01, 2012 5:39 am

The same code seems to be used in 1.4.9.x.

I will test it in my store and let you know if it works.

If so, THANKS!

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by lee420 » Fri Apr 20, 2012 6:14 am

Great addition. Works a treat. Thanks.

Newbie

Posts

Joined
Tue Apr 10, 2012 7:35 am

Post by ian007 » Thu Oct 18, 2012 4:33 pm

This mod doesnt seem to work in 1.5.4.x
With product discounts and specials set, the result is that the discounts disapear (search, product, category etc..)

I would really like discount prices to work and update with specials, anyone know of a mod or code change to make this happen?

Many thanks.

Newbie

Posts

Joined
Thu Oct 18, 2012 1:59 am

Post by dudumagic » Sun Oct 21, 2012 6:15 pm

it's not work to me 1.5.4

Parse error: syntax error, unexpected '}' in /home/kingmagi/public_html/instockmagic.com/vqmod/vqcache/vq2-system_library_cart.php on line 332

New member

Posts

Joined
Tue Sep 04, 2012 12:51 am

Post by beipink » Thu Nov 15, 2012 6:43 pm

Daniel wrote:its not a limitation. its how the system should work.

the system is very flexible it has a massive discount system with coupons, price breaks, special offers. if you don;t set them correctly they don't work how they should.

don't use special prices with quantity discounts they don't mix well.
Hi Daniel
you see it from an development point of view and of course this is not a limitation for you because they are 2 different features, however I think your users have their reason to ask for such a feature.
From a selling point of view rules are different. A seller looks are the nr of transactions and how to increase them. Strategic pricing/discounts of products is a good way. In fact when a item is on special it sells more.
Other features like Cart, Category discounts, buy 3 and pay 2 etc etc are also becoming more standards features that help to increase sales.

Active Member

Posts

Joined
Tue Mar 20, 2012 7:43 pm

Post by dr770 » Mon Jan 28, 2013 5:38 am

@uksitebuilder - you are the hero! your mode works with 1.5.4.

Daniel, with all respect, this is indeed limitation, for ex. for stores which have specials for default clients and discounts for wholesale. Just accept it and take this fix in the feature update.

thanks.

New member

Posts

Joined
Mon Oct 15, 2007 1:53 am

Post by GraemeH » Sun Mar 24, 2013 2:09 am

I have the same issue with it not working in 1.5.4.1 - I would really appreciate it of this could be fixed. When I go to a product page I get:

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/tikprod1/public_html/vqmod/vqcache/vq2-catalog_controller_product_product.php on line 556

New member

Posts

Joined
Fri Apr 20, 2012 4:56 pm
Who is online

Users browsing this forum: No registered users and 38 guests