Author Topic: Serious problem with child product pricing  (Read 11856 times)

brendonhatcher

  • Jr. Member
  • **
  • Posts: 90
Serious problem with child product pricing
« 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


jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3549
  • using Matomo instead of Google Analytics
Re: Serious problem with child product pricing
« Reply #1 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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Serious problem with child product pricing
« Reply #2 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]
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Ways100

  • Beginner
  • *
  • Posts: 1
Re: Serious problem with child product pricing
« Reply #3 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

dsrpmedia

  • Jr. Member
  • **
  • Posts: 332
Re: Serious problem with child product pricing
« Reply #4 on: April 05, 2013, 06:09:35 am »
Quote
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.

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

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 14
Re: Serious problem with child product pricing
« Reply #5 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)





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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3549
  • using Matomo instead of Google Analytics
Re: Serious problem with child product pricing
« Reply #6 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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

nerfmarius

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 14
Re: Serious problem with child product pricing
« Reply #7 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.

Frank Beier

  • Beginner
  • *
  • Posts: 41
  • Do or Do Not, there is no try.
    • Ohio Web Design - Dynamic Webs, LLC
Re: Serious problem with child product pricing
« Reply #8 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?

oviliz

  • Beginner
  • *
  • Posts: 27
Re: Serious problem with child product pricing
« Reply #9 on: June 18, 2014, 15:03:26 pm »
Great topic...  :(

dkaneloglou

  • Beginner
  • *
  • Posts: 31
Re: Serious problem with child product pricing
« Reply #10 on: April 27, 2015, 16:14:21 pm »
Ways100 did you found any solution?
I have the same problems and questions..
Can somebody help???!!

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

  • Beginner
  • *
  • Posts: 7
  • A beginner
  • Skype Name: sanket_jack
Re: Serious problem with child product pricing
« Reply #11 on: May 19, 2015, 11:52:37 am »
any suggestions on this guys?  :(