Author Topic: Child price change changing category  (Read 1049 times)

Geppux

  • Jr. Member
  • **
  • Posts: 173
Child price change changing category
« on: January 26, 2016, 12:42:00 pm »
VM 3.0.12 - J 3.4.8

Hi I try to explain what happens ...
The price structure of my products is made in this way:  I have some dummy categories for taxes or discount so to fix a price I insert the cost price and it changes depending on the categories of the product.
When I have child, I insert the parent price as usual, I just insert a different cost price in the child products list of the parent only if the price of a children is different and I don't give categories to the child, and everything goes smoothly, the child inherits the parent price and taxes and calculation rules.....but...if I assign a category to a child it don't inherits the rules and taxes so the price shown is the cost price and to obtain the correct price I have to insert the child in the same dummy categories of the parent. Is it normal, is it a bug, I'm missing something?
Thank you.
Giuseppe

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Child price change changing category
« Reply #1 on: January 29, 2016, 17:32:23 pm »
Not sure if this is the same issue we have.

If childs have no category they don't inherit the tax rule of the parent so what we do each time we have to change the price of a child is first assign it to the category where the parent belongs, then click "calculate base price" since we enter the price directly in the final sale price.

That way it takes the tax from the parent to calculate the price.

Is very strange what you comment cause in my case the child does inherit the rules of the parent when they have a category assigned but not when they have no category but we don't use those dummy categories you mention, instead our tax rules are assigned per category.

Regards

Geppux

  • Jr. Member
  • **
  • Posts: 173
Re: Child price change changing category
« Reply #2 on: January 29, 2016, 18:38:38 pm »
Well, I call them dummy categories just because exist but are unpublished but they are normal categories like yours, the strange it that my products behave in the opposite way than yours...

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9838
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Child price change changing category
« Reply #3 on: February 04, 2016, 23:18:35 pm »
VM 3.0.12 - J 3.4.8

Hi I try to explain what happens ...
The price structure of my products is made in this way:  I have some dummy categories for taxes or discount so to fix a price I insert the cost price and it changes depending on the categories of the product.
http://docs.virtuemart.net/manual/general-concepts/207-categories.html
We call them almost the same "CONTROL CATEGORIES (DUMMY CATEGORIES)"

When I have child, I insert the parent price as usual, I just insert a different cost price in the child products list of the parent only if the price of a children is different and I don't give categories to the child, and everything goes smoothly, the child inherits the parent price and taxes and calculation rules
nice, niice :-) I think that is the first time that I read in the forum, that someone uses the full potential of product derivation and control categories to create prices.

.....but...if I assign a category to a child it don't inherits the rules and taxes so the price shown is the cost price and to obtain the correct price I have to insert the child in the same dummy categories of the parent. Is it normal, is it a bug, I'm missing something?
Thank you.
Giuseppe
This is exactly the way it is intended. It is even more complex. The categories are not inherited for browsing your products. Only products with a visible category are browseable within the store. The reason is that the sql searches for products which has an xref table entry to a certain category.

But a displayed product (also in the category browse page) is always inheriting the categories of the parent as long there is no category set.

So when you set 1 category, you override any category of the parent. Else we would have to merge the category arrays and it would not be possible to remove a category from a child. So either you set nothing, or you set any.

And to underline, there is the convention:
Categories are entered =>browseable in store
This "defines" also the diffference if you present a product as a variant or on its own


Not sure if this is the same issue we have.

If childs have no category they don't inherit the tax rule of the parent
This is wrong. Your misunderstanding is, that you enter the final price and you want to have calculated the baseprice, which does not work with the inherited categories. Yes

Interesting problem btw, we may change this, by adding inherited categories for recalculation
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Geppux

  • Jr. Member
  • **
  • Posts: 173
Re: Child price change changing category
« Reply #4 on: February 04, 2016, 23:31:56 pm »
Thank you Milbo for the explanation, now it's clear.

Giuseppe

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Venta de naranjas online y mandarinas
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: Child price change changing category
« Reply #5 on: February 05, 2016, 14:59:54 pm »
This dummy categories thing is interesting, Im gonna read and check carefully, when we set childs at the first stage was quite a recent addon and there was no documentation back then so I guess is time to read and learn more about the use, thanks.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9838
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Child price change changing category
« Reply #6 on: February 07, 2016, 15:05:40 pm »
dummy categories are part of the calculation rules system since very long time. For more than 4 years.

http://forum.virtuemart.net/index.php?topic=98642.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/