News:

Support the VirtueMart project and become a member

Main Menu

Serious problem with child product pricing

Started by brendonhatcher, March 16, 2013, 19:46:12 PM

Previous topic - Next topic

brendonhatcher

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


jjk

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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

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]
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Ways100

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

dsrpmedia

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

nerfmarius

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)





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?


jjk

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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

nerfmarius

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.

Frank Beier

Will the updated product.php file work for Joomla 2.5.14 and VM2.0.26d as it did for the previous version?


idor

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

sanket_jack