VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: ThijsGaublomme on April 22, 2016, 12:50:55 PM

Title: Discount on category applies to all categories
Post by: ThijsGaublomme on April 22, 2016, 12:50:55 PM
Hello,

I've created a shopper group: Reseller.

These resellers have 10% discount on some categories.

I've setup a discount rule and linked it to the shopper group: Reseller
The discount is calculated on price before tax in the cart.
This works fine if my first added product in my cart belongs to the category in my discount setup.

If I add another product of another category first, the discount is calculated too and this is not correct.

I'm useing joomla version 3.5.1 and virtuemart version 3.0.16

If you need more info, please let me know and I'll do my best to document it with examples.

Thank you to anyone who can have a look at this.

Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 24, 2016, 11:36:15 AM
Hello,

I've tested a lot of options but I cannot seem to get it working properly.
Also with protostar template this issue is present. Think it's a bug in the checkout page of virtumart.

Does anyone know if the discount on categories of even manufacturers works properly?

Adding another price individualy per product for my shopper group is not possible because of 2 things:

1: they need to see the "normal" price on the product and have there discount taken care of in the cart
2: I have almost 6000 products (out of 10000) where this discount is applied to...

Thank you to anyone who can have a look at this.

Title: Re: Discount on category applies to all categories
Post by: franzpeter on April 25, 2016, 10:48:15 AM
Did try that out and for me it works. How to configure:
Create a new shopper group (reseller?). Set: on: Additional Shoppergroup. Set off Enable shoppergroup specific price display. Now create a calculation rule. Name it to whatever you want (for example reseller). Set it to published. Type of Arithmetic Operation: Price modifier before tax per bill. Math operation: -%. Enter the desired value. In Product category choose the desired category you would like to grant discount for the reseller shopper group. In Shopper group choose your Reseller shopper group. Save the configuration.
Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 11:11:17 AM
Hello,

Thank you for your reply.
I did all of that.

Shopper group created like you said.
Created the rule like you said. Linked the categories and shopper group to discount rule.

It works fine, but only if my first product i order, is in the category of the discount rule.

Could you try to add a product that is not in a category of the discount and add it as first and only product in the cart?
If i do that, my first product gets the discount too.
If I add a product afterwords, which is in the category of my discount, it is recalculated and correct.


Could you do the test please?
Thank you.


I've added all my printscreens in english for my configuration.
Title: Re: Discount on category applies to all categories
Post by: franzpeter on April 25, 2016, 15:21:01 PM
Did try it out and I can confirm that problem. If there is nothing before in the cart and I add a product which does not belong to the calculation rule for reseller it gets the rebate inside the shopping cart page. If
Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 15:40:05 PM
I think your reply isn't complete... ends with if...  :P

I'm glad I'm not the only one with this bizarre problem.

Is there a solution to it or could this be reported as bug to fix in a new version?
Don't know how this works so...
Title: Re: Discount on category applies to all categories
Post by: StefanSTS on April 25, 2016, 15:50:38 PM
Is there any reason, why you don't use "Price modfier before tax"?
Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 16:08:21 PM
Yes,

My reseller needs to see the normal price in the productdetails (to give the retailprice to his customer) and in the cart he gets his discount.

On the other hand, If it should work by having the discount directly in the product, but to keep my normal pricing, it's ok by me.
But never got it working properly.

See attachement:
Yellow labeled prices are the prices shown to everyone.
My reseller gets 10% off on some products where his 10% states on the red circeled price.

If I can show his product with normal discount and additional discount for my reseller it's ok, but don't think that is possible...

I also added attachement of my price setting to become the crossed "normal" price and the sales price with discount.


Title: Re: Discount on category applies to all categories
Post by: StefanSTS on April 25, 2016, 16:43:43 PM
If you "Apply default rules" for your tax and "Apply generic rules" below that, all "taxes/discounts" will be applied, that your defined rules give for that product.

So if you have a discount for normal shoppers, and a discount for the reseller from the additional shopper group, both will be applied for the reseller, only one for normal customers.

That should work as expected.
Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 16:51:20 PM
I have 3 tax rates...

6 / 12 and 21 %

So I can't apply default tax rules on my products.

I'm still looking for a solution to have the discount before tax at bill, that's still the best option for me and most logical.

Hope there's a solution possible for this bug. What's your opinion?
Title: Re: Discount on category applies to all categories
Post by: StefanSTS on April 25, 2016, 17:26:51 PM
If you have unpublished categories tax 6, tax 12 and tax 21, and you link them with your tax rules, and give your products these categories, everything works well.

VirtueMart 3 is here. ;-)

Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 17:32:46 PM
I don't quite understand your last post, could you explain a little more?

I have tried the previous post about setting my product to default and generic rules below that, but my prices were calculated wrong.
It taxes 35% in stead of 21%... don't know where that comes from.



Title: Re: Discount on category applies to all categories
Post by: StefanSTS on April 25, 2016, 17:47:53 PM
Well,

explain a little more could be pages.

In short. I always use the generic/standard rules, whatever it is called. The meaning behind that is.

You have the "Tax & Calculation Rules", everything in there is controlled by categories, shopper groups, whatever.

So if your calculation is not right, you have to check your rules. If you have 35% instead of 21%, maybe your 12% have been added for some reason to your 21% rules, because of some rule, that might be applied to "ALL" categories/groups or so.

If you have applied 12% for a category "food" and to the category "tax 12" and your product has both groups, it will be applied two times. So to use the generic rules, it is best to disable all rules first and slowly extend it one by one. It is a whole new thinking process if you are used to the old VM2 rules. Bammm, fixed 21% VAT, bammm, my discount below, finished. You can still do that, but if you want to have a complicated system like yours, you have to make a nice drawing on a white piece of paper first and get the picture of the whole system.

Every system is different, so this is not explained easily in a "general" way.

Hope, this was not too confusing
Stefan
Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 18:12:09 PM
Now I see what you mean, but it can't work for me. (that's the reasen why i had fixed the vat per product)

In this sector it's possible to have 1 category, for example "Mass Spamming" where some products are at 12% tax and others 21% tax.
So there's no way my taxes can be handled by categories.

See the problem?

In fact, there are some more tax rules applied for customers with VAT number in European union who don't have to pay tax.
So that would be way to complicated.

In fact, all works fine with all taxes and discount rules now.

The only problem still present is the first product I add to my cart when logged in as reseller (10%discount on certain categories or even manufacturers) that doesn't belong to the category of my discount rule.

If that could be fixed, all works well for me.


Title: Re: Discount on category applies to all categories
Post by: franzpeter on April 25, 2016, 18:34:10 PM
I confirm that. There is a problem: Rules apply if there is a product inside the shopping cart, which has the reseller rule applied. Else every product gets the reseller rule! And it does not matter if an additional hidden calculation category for the reseller rule exists where you link all those products which rebate as additional category (just for calculation purpose)!
Title: Re: Discount on category applies to all categories
Post by: StefanSTS on April 25, 2016, 18:46:38 PM
Quote from: ThijsGaublomme on April 25, 2016, 18:12:09 PM
In this sector it's possible to have 1 category, for example "Mass Spamming" where some products are at 12% tax and others 21% tax.
So there's no way my taxes can be handled by categories.

Your tax category needs to be an unpublished category, best be called "Tax xy%". This category, you additionally apply to the product. It is not necessary to apply your tax to "Mass Spamming". Here the second category comes into play.

You can use the tax on a "pure" product category if you like, if you only have 21% in one category, but I prefer to apply the hidden tax category to every product.

Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 19:30:30 PM
I'm sooo very sorry but I can't seem to get it working with an unpublished category.

My prices are ok now, that works when I changed my tax rules with those categories.
But then my discount rule doesn't aply any more...

I think I totaly lost it...

Is there any way the problem could be solved in a next virtuemart version?
Title: Re: Discount on category applies to all categories
Post by: franzpeter on April 25, 2016, 21:20:07 PM
So I did create two additional categories, both set as hidden category. The one is for the VAT Tax, which works! The second one is to apply the rule for the shopper group thing (reseller). That is how it should be done in VM. Did in addition link those products, for which I would like to give a reseller discount tp that category too. So did create a new calculation rule for the shopper group reseller and did link the reseller shopper group to that calculation rule and in addition did link the hidden category to those products, where a reseller discount should take place. Because the reseller discount should only show up in cart calculation the calculation rule is set to -%xxx and price modifier before tax per bill. AND:  it occurs like described from ThijsGaublomme. It works only in case of non discount products if there is a reseller discount product in cart. Else the discount gets applied to all products. And that is wrong. >:(
Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 21:36:27 PM
Thank you, Thank you, Thank you franzpeter!!!!!

I thought I was loosing my mind over this issue.

So if I understand correctly, I don't have to make all these complicated links and extra rules which are linked to other categories etc...
It all works with my simple configuration, which made sence to me.

Just that it doesn't aplly correctly in the cart for the first product if it's not in the discount category.

So this is a bug in the system?
Title: Re: Discount on category applies to all categories
Post by: franzpeter on April 25, 2016, 23:09:36 PM
I would call it a missing feature  ;D
Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 25, 2016, 23:44:12 PM
Ok, lets call it a missing feature (that's kinda allready in it but misses one check...)  ;D

Any idea how we could resolve this missing feature? With a patch or is there a way to report this so it can be looked after for a next version or something else?
It's not urgent for me but should be a nice to have... ;)

I'm terrible at programming and have no clue how I could work arround this or even where to begin searching. :o

Title: Re: Discount on category applies to all categories
Post by: StefanSTS on April 26, 2016, 23:19:59 PM
I don't understand, why it is in all depth explained, how it doesn't work. Forget that "per bill" and all will work out.
No need for fixes, that "per bill" was not made for that purpose, that was for easy discounts on a bill.

Use "price modifier before tax". I tried that yesterday, working as expected. If you have the wrong prices showing up, use the prices configuration, there are close to ten different prices you can choose.

Title: Re: Discount on category applies to all categories
Post by: ThijsGaublomme on April 26, 2016, 23:59:41 PM
NO, I won't forget that "per bill" because it should work and it works, but as many times explained before, it applies on the first product you put in the cart even if the discount isn't applied to the discount rule.

I use an easy discount per bill, it can't be less easy. discount on bill for applied categories.

Price modifier befor tax does not work and I am in no need to setup all kinds of different workarounds to my webshop with 10000 products which makes it to complicated and time consuming.

The rule stakesthat there is a way to have a discount before tax in the cart/bill.
The reason to do this is that my reseller has to know the normal sales price which he can view in the product.
When billed he gets his discount to let him have the normal price and after discount his purchase price to have a profit on the product he selles again.

If you are so convinced that your way works, prove it to me. please show me in detail (with images please) how you configured your product to have the same end result.

Product should show:
Base price (strikethrough)
Sales price (temporary discounted price)
Normal discount
Additional discount for my reseller

Cart should show:
Base price (strikethrough)
Sales price (temporary discounted price)
Normal discount
Additional discount for my reseller
End sales price (price he has to pay at the end)

If you can manage that without the discount per bill, I'll try the same configuration.
And I'll be thankfull.

Thank you,

Kind regards
Title: Re: Discount on category applies to all categories
Post by: StefanSTS on April 30, 2016, 08:00:05 AM
I can only give you a hint, in which direction to go, that's all. The solution for you problem needs a look into your rules and serious time that I don't have at the moment.

Try it in a fresh installation. It will be easier if the old rules do not interfere.

You have to get away from the impression it could work with "per bill". It doesn't work, because it was not intended for this case. If you want to do it with that rule, you can try to contact iStraxx via ticket, so that they add that feature for you, maybe they can do it in one or two hours, but following my hint from before will be cheaper.

Sorry for not being too helpful
Stefan
Title: Re: Discount on category applies to all categories
Post by: Studio 42 on April 30, 2016, 14:47:42 PM
Hi,
Per bill, is per bill and not per product. Per bill calculation is at end , after product prices for the whole bill(products).
If you don't understand, you cannot fix your problem.
Regards,
Patrick