Author Topic: Subtotal wrong  (Read 352 times)

rishabhchd19

  • Beginner
  • *
  • Posts: 12
  • A beginner
Subtotal wrong
« on: March 09, 2017, 01:02:18 am »
I want to show subtotal as total - discount. Please see the attached image for better understanding of my issue. Is there anything wrong with the calculationsh file in helpers folder?

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 897
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.9
Re: Subtotal wrong
« Reply #1 on: March 09, 2017, 07:04:38 am »
Hello

This looks strange. Have You assigned a negative discount ? Or made it +% in the setup for the calculation rule ?

I Think You have made an error in the calculation rule.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

rishabhchd19

  • Beginner
  • *
  • Posts: 12
  • A beginner
Re: Subtotal wrong
« Reply #2 on: March 09, 2017, 07:14:47 am »
Hello

This looks strange. Have You assigned a negative discount ? Or made it +% in the setup for the calculation rule ?

I Think You have made an error in the calculation rule.

regards

Jörgen @ Kreativ Fotografi


I kept everything default. No calculation rule altered. I hv just simply set the price, a discount and tax as 0. I just insert digit 83 there and no negative discount. Really amazed to see tht error.  :D

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 897
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.9
Re: Subtotal wrong
« Reply #3 on: March 09, 2017, 07:22:06 am »
Using price override in an old legacy feature from VM1 and does not work very well in the new calculations.

Better use a calculation rule as discount, please refer to the documentation for using calculation rules.
Simply create hidden discount categories and calculation rules that conected to these. Assign Products
to these categories. Easier to manage, You can see what product is assigned to which discounts.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

lindapowers

  • Full Member
  • ***
  • Posts: 1340
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Subtotal wrong
« Reply #4 on: March 09, 2017, 11:08:17 am »
Using price override in an old legacy feature from VM1 and does not work very well in the new calculations.

Better use a calculation rule as discount, please refer to the documentation for using calculation rules.
Simply create hidden discount categories and calculation rules that conected to these. Assign Products
to these categories. Easier to manage, You can see what product is assigned to which discounts.

regards

Jörgen @ Kreativ Fotografi

The problem is that having to create a calculation rule for each discounted product is really hard work and boring while the override price is super easy and fast, even to these day we try to use it where possible but yes it has some issues.

I really encourage the dev team to maintain these old feature cause is a loooot easier to just use the override final price in each product when you usually set several discounts on products than the nightmare of creating each discount rule individually.
http://www.comenaranjas.com - Navel oranges and clementines from Spain

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 897
    • Kreativ Fotografi
  • VirtueMart Version: 3.0.19.9
Re: Subtotal wrong
« Reply #5 on: March 09, 2017, 11:45:05 am »
I was not so happy about this either. But This is how I use it:

I have a rule for example 10 % discount. Making the following categories:
10% discount
20% discount
30% discount
and so on

You do have to do a discount rule for every combination, but not for every Product. I use around ten discount rules which covers my needs. It could also be based on value instead of percent, -100, -75, -10 and so on.

I just add the Product to the appropriate category an voila, correct discount. As a bonus I can see which Products are on 10 % discount by checking the category.

Combining 30 % and 10 % is a bit trickier, because you get 30 % discount on the original price and then 10 % of the already discounted price. A total of 37 % discount.

It is not a perfect system. But it works. Loading new prices with csv might be more efficient. Before I had to manually search for every discounted product, now I an see which category it is assigned to or search by category for discounted products.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.6.5
Virtuemart 3.0.19.9
Olympiantheme Hera (customized)

lindapowers

  • Full Member
  • ***
  • Posts: 1340
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Subtotal wrong
« Reply #6 on: March 10, 2017, 22:03:05 pm »
Thanks Jorgen

I guess is the correct way to do it, we did similar but even more complicated cause our discounts are specific per product so we end up having to create a specific discount rule for each.

I guess your method is great for a few products or for an overall discount like your example: 10% 20% 30% but what If you want 14% discount or 21% discount or a discount of 4.57 € each different in each product?

Creating a rule for each one is a hard job so the override really helps there.

I really hope they don't get rid of the override price completely cause is the easiest way and is a very nice feature I'm sure many shopowners use.
http://www.comenaranjas.com - Navel oranges and clementines from Spain

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 8879
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Subtotal wrong
« Reply #7 on: March 16, 2017, 09:45:50 am »
Atm I plan or develop already virtually a new calculator, which works also with brutto prices.

The error above is imho impossible with the current calculator, but when he edited the order and got these values, it is absolutly clear. When you check the Feature list for vm3.0.19.9 then you see the enhanced order editing. I overhauled the calculation within order editing, which does not use the calculatorh.

The problem in the calculation above is the "gros price without discount", which is set to 410, and the costprice (or net price) is set to 493. The last columns compares the "gros price without discount" with the final price, which is "gros price with discount".
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bortolani

  • Jr. Member
  • **
  • Posts: 90
Re: Subtotal wrong
« Reply #8 on: March 16, 2017, 15:18:48 pm »
I totally agree with Lindapowers: price override is a lifesaver.

In most cases our prices are discounted and then further reduced to look something like xx.99
For example 120€ list price becomes 99.99€ discounted.
Writing a discount rule each time would take too long.

Bruno

rishabhchd19

  • Beginner
  • *
  • Posts: 12
  • A beginner
Re: Subtotal wrong
« Reply #9 on: March 16, 2017, 16:19:58 pm »
This night, I'm going do this, check n get to you...Thanks guyz