Author Topic: Child product prices deleted after parent product is altered..  (Read 7014 times)

dangelo

  • Beginner
  • *
  • Posts: 28
Hi there,

I'm trying not to ask for help before asking or reporting something as a bug.

This one I think that it is, and a very BIG one..

Info: Joomla 2.5.11, VM: 2.0.22a, PHP:5.3.21

I have set my parent/child products as follows:
     -Parent product (no price)
             -Child#1 (shoppergroup#1 = 10E, shoppergroup#2 = 20E)
             -Child#2 (shoppergroup#1 = 20E, shoppergroup#2 = 40E)

So far everything are OK! If for some reason I want to change the photo or add a new one, or to change the short description, or make any change at all at parent product, ALL the prices from child products are deleted!!!

     -Parent product (no price)
             -Child#1 (shoppergroup#1 = 10E, shoppergroup#2 = 20E)
             -Child#2 (shoppergroup#1 = 20E, shoppergroup#2 = 40E)
Here:http://forum.virtuemart.net/index.php?topic=114891.msg389733#msg389733 you are mentioning that the problem is fixed at latest SVN version at the time (May 16, 2013).

Can you please be more specific about this issue?

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: Child product prices deleted after parent product is altered..
« Reply #1 on: July 29, 2013, 16:45:10 pm »
Yes it is a bug and the problem appears if the parent has no price. Please try the attached file. (rename it to product.php)

copy to

administrator/components/com_virtuemart/models/product.php

Dont forget backup of the old file!

only for VM 2.0.22a

[attachment cleanup by admin]

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: Child product prices deleted after parent product is altered..
« Reply #2 on: July 30, 2013, 10:25:36 am »
Have you tried it? Please let me know if it works for you.

justheff

  • Beginner
  • *
  • Posts: 1
Re: Child product prices deleted after parent product is altered..
« Reply #3 on: August 14, 2013, 04:20:04 am »
Confirming that this fixed the bug for me. Thanks ;)

tmdonovan

  • Beginner
  • *
  • Posts: 27
Re: Child product prices deleted after parent product is altered..
« Reply #4 on: September 20, 2013, 19:46:45 pm »
We are running VM 2.0.22a and make extensive use of parent products and child products.  The parent product is already assigned a price and each child product has 5 prices, because we have several shopper groups.  Our child prices are getting deleted all the time and I can't understand why.  I'm sure there is some logic behind why the child prices get deleted when product description or other attributes are changed but it does not make sense to me.  But I want to know if this fix will work for us since our parent products have a price already and the description of the bug here explicitly says it happens because the parent does not have a price.



Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10124
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Child product prices deleted after parent product is altered..
« Reply #5 on: September 21, 2013, 10:40:37 am »
yeh did you use the file send by kk? Or use 2.0.22c!
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Leo123

  • Beginner
  • *
  • Posts: 1
Re: Child product prices deleted after parent product is altered..
« Reply #6 on: December 30, 2013, 08:21:46 am »
It will not display on any pages other than "productdetail" also it will not display if there are no products in the order history. Should in fact hide the entire module as it does not get called into play.     :-*

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10124
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Child product prices deleted after parent product is altered..
« Reply #7 on: December 30, 2013, 17:38:11 pm »
? You need to give your childs a category if you want that it is browseable.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/