VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: brendonhatcher on March 16, 2013, 19:46:12 PM

Title: Serious problem with child product pricing
Post by: brendonhatcher on March 16, 2013, 19:46:12 PM
Hi

PHP 5.2.17
Joomla 2.5.6
VirtueMart 2.0.20a

I installed a fresh build, with sample data.
I looked at the Hand Shovel product included in the sample data.
It has child products.
These child products have different pricing to the parent.

On the frontend, I browse to the parent product.
The button says "choose a product variant".
I then choose a child product from the drop down.
The page refreshes, showing the child product details including price.
I add the child to the cart.
The shopping cart shows the parent price, not the child price!

Issue 1: Is the logic that parents cannot be purchased?
I tried setting the custom field to Parent orderable = checked
The parent is in the drop down list, but not selectable - the add to cart button never appears when you select the parent from the drop down

Issue 2: How do I get the child price to carry through to the cart?


Thanks
Brendon

Title: Re: Serious problem with child product pricing
Post by: jjk on March 16, 2013, 21:02:42 PM
Looks like you detected a new bug in VM 2.0.20a. The problem was already fixed in 2.0.20 but obviously reappeared. I'm shure this will be fixed asap.
Normal behaviour would be this: http://forum.virtuemart.net/index.php?topic=102323.msg382135#msg382135 (http://forum.virtuemart.net/index.php?topic=102323.msg382135#msg382135)
Title: Re: Serious problem with child product pricing
Post by: Milbo on March 17, 2013, 01:10:58 AM
Heyho, I did not read the post, just got the message that we have the opposite problem then before,.. here is a corrected product model (administrator/components/com_virtuemart/models/product.php). Tested with child product without and with parent price.

remove the .txt btw

[attachment cleanup by admin]
Title: Re: Serious problem with child product pricing
Post by: Ways100 on March 17, 2013, 10:41:08 AM
Hi

I also had the same problem and the new product.php file fixed it. Thanks Milbo.

Could someone please help me with a couple of questions.

1: When I select the child product and add it to the cart. How do i get it to also display the Parent and Child name.
eg: Parent "Shirt" Child " Large"
Now when I select the child product just the "Large" is displayed in the cart. It would be nice to show Shirt Large.
If I change the Child name to "Shirt Large" then the drop down list would show the whole name and I would like it to just show the Size, as some of the parent names are long.

2: Is there a setting to get the child product price to be displayed in the drop down box and price added to the parent if selected. Same as with the product Attributes.

Thanks Wayne

Joomla 2.5.6
VirtueMart 2.0.20a
Title: Re: Serious problem with child product pricing
Post by: dsrpmedia on April 05, 2013, 06:09:35 AM
Quote1: When I select the child product and add it to the cart. How do i get it to also display the Parent and Child name.
eg: Parent "Shirt" Child " Large"
Now when I select the child product just the "Large" is displayed in the cart. It would be nice to show Shirt Large.
If I change the Child name to "Shirt Large" then the drop down list would show the whole name and I would like it to just show the Size, as some of the parent names are long.

2: Is there a setting to get the child product price to be displayed in the drop down box and price added to the parent if selected. Same as with the product Attributes.

I have been begging for this since vm 2 came out - it was so easy to do in VM 1

any help would be greatly appreciated
Title: Re: Serious problem with child product pricing
Post by: nerfmarius on December 31, 2013, 14:39:31 PM
Hello,

the issue still exists in the latest version (2.0.26a)

I tried the file Milbo posted but it gets me to Internal server error.

I'm trying to solve quite an obvious task here, I have a product (seeds) that has different size package.

So for example I have same seeds with packages 100 g and 200 g.

I have created a product with two childs (obviously I will like to have different prices for the different size packages)

(http://shops.projects.joomwebsites.com/nojus_new/Childs1.png)

(http://shops.projects.joomwebsites.com/nojus_new/Childs2.png)

I am using Stockable child variants in custom feads and I assigned these two childs for it.

The issue:

Childs somehow gets price with discount amount 100% for some reason, I tried to play after with overrides etc, adding screen with all prices printed. Is this a known issue?

(http://shops.projects.joomwebsites.com/nojus_new/Childs3.png)
Title: Re: Serious problem with child product pricing
Post by: jjk on December 31, 2013, 16:31:03 PM
I think, primarily you have a javascript conflict on your website. Errors I can see (using the Firefox plugin 'Firebug') are:
TypeError: jQuery(...).fancybox is not a function
.../nojus_new/svogunines-geles/rudenines-geles/tulpes/tulpes-double-late-pilnavidures-velyvos/tulpes-abigail.html, Line 99

ReferenceError: wtpQualitySign_timer2 is not defined
.../nojus_new/svogunines-geles/rudenines-geles/tulpes/tulpes-double-late-pilnavidures-velyvos/tulpes-abigail.html, Line 1

ReferenceError: wtpQualitySign_toggleSmallPopup is not defined
.../nojus_new/svogunines-geles/rudenines-geles/tulpes/tulpes-double-late-pilnavidures-velyvos/tulpes-abigail.html, Line 1

Also I think your template loads jQuery 1.9 which probably breaks the fancybox 1.3.4

Do not use the old product.php from the above posts. That one was for VM 2.0.20.
Title: Re: Serious problem with child product pricing
Post by: nerfmarius on January 02, 2014, 09:34:11 AM
Hello,

thanks for the reply, I am aware of the javascript errors, however they can't cause price issues as prices are taken from the database and not formatted in client side. Anyway I have found the issues on my own, so there is

1 bug:
child products do not inherit currency (I didn't notice at first that why i got wierd prices.)

2 bug,
if parent product has "Overwrite final" set, childs inherit this, that is kind of wrong, at least by the use case I have.

I think it would be logical, that if child product has custom price set, it would not inherit any prices from the parent.
Title: Re: Serious problem with child product pricing
Post by: Frank Beier on April 06, 2014, 22:59:44 PM
Will the updated product.php file work for Joomla 2.5.14 and VM2.0.26d as it did for the previous version?
Title: Re: Serious problem with child product pricing
Post by: oviliz on June 18, 2014, 15:03:26 PM
Great topic...  :(
Title: Re: Serious problem with child product pricing
Post by: idor on April 27, 2015, 16:14:21 PM
Ways100 did you found any solution?
I have the same problems and questions..
Can somebody help???!!

Quote from: Ways100 on March 17, 2013, 10:41:08 AM
Hi
Could someone please help me with a couple of questions.

1: When I select the child product and add it to the cart. How do i get it to also display the Parent and Child name.
eg: Parent "Shirt" Child " Large"
Now when I select the child product just the "Large" is displayed in the cart. It would be nice to show Shirt Large.
If I change the Child name to "Shirt Large" then the drop down list would show the whole name and I would like it to just show the Size, as some of the parent names are long.

2: Is there a setting to get the child product price to be displayed in the drop down box and price added to the parent if selected. Same as with the product Attributes.

Thanks Wayne

Joomla 2.5.6
VirtueMart 2.0.20a
Title: Re: Serious problem with child product pricing
Post by: sanket_jack on May 19, 2015, 11:52:37 AM
any suggestions on this guys?  :(