2 replies [Last post]
Grahamwise's picture
Joined: 06/16/2013
Juice: 11
Was this information Helpful?

I have a client whom I have been building a Drupal/Ubercart based site for. He wishes to have working Variable Price on his Product Kits. I have it setup and working fine on Singular Products, and it seems to integrate fine into the Product Kit, however upon "Adding to Cart" (after setting price). The total is automatically adjusted to the Combined Products Price & Discount.

A little farther in depth. My client is in the Video Game Sales/Resales Industry and this site is going to be a "Pick Your Own Price" Bundles Only site. So Varprice function on singular items means very little to us.
Basically we would like varprice to function with product kits, exactly as it does with products. We are specifically using Drupal 6 due to things that would not work correctly, and/or were not available in Drupal 7.

If anyone could kick off a little help with this, myself and/or my client would make it worth your time.

Regards & Thanks in advance Smiling

PatchRanger's picture
Joined: 08/15/2012
Juice: 50
Hope it helps

Hello Graham,

Take a look at the appropriate issue in UC Variable Price issue queue: http://drupal.org/node/584374. There are several ideas that look good.

Dmitry Danilson (aka PatchRanger ( http://drupal.org/user/1209848 )).

Grahamwise's picture
Joined: 06/16/2013
Juice: 11

Yes I came across this yesterday. Actually my client got nervous about Ubercart due to several issues within it and had me migrate him to drupal 7 with commerce kickstart. So seems this has been worked out.

Thank you for you response

And Incase it helps future users.

if (strpos($form_id, 'uc_product_add_to_cart_form_') === 0)

Lines like that within Ubercarts varprice cause a lot of issues. The Operator '===' is indeed a valid operator, but not in the case of varprice. (Equal to if) is pretty much what that translates to, and that my friends is creating variables that are dependent on other variables.

Change them from ('===') , into ('==')...it will fix many issues.

The issue is NOT that Variable Price doesnt appear for Product Kits. The issue is that it doesnt pass the variable price to form because the module is written to run "Add to Cart form" for "Products" not "Product Kits". Why they would do that when creating varprice is beyond me. They should have coded it to pass forms for all Product types by using wildcards.

Probably a good idea that someone rewrites the entire module, because it is coded terribly....I however will be working in the Commerce Frame......gonna let Ubercart go, has caused me to many issues and to much delay