When adding a product kit the variable price feature is not displayed.

Comments

OsterD’s picture

Status: Active » Patch (to be ported)

I have just figured out the problem of not displaying on product kit.
There is an error on the code of the module, uc_varprice.module, line 42,

if (strpos($form_id, 'uc_product_add_to_cart_form_') === 0) { <---- it has '===' where should be '==' for equality

so, the correct line should be,

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

Sorry, I do not know how to port a patch.

OsterD’s picture

Another problem has arose now.
The cart form is not altered when a different price is entered on the variable price textbox and the default maximum price is displayed on the Checkout.
Single products and not kits are not affected by the proposed alteration as on comment #1.
The product class does contain the variable price feature.

For a preview look here, http://energyshopping.odphotography.com/content/products/kits/basic-adva...

Shai’s picture

Did you ever get this to work? I'm also noticing that variable price does not work with product kits. I'm using Ubercart 2.4 and variable price 1.0 rc3.

Shai

rj’s picture

I had the same problem. What I ended up doing was using uc_custom_price and uc_attribute_tokens instead of uc_varprice, which gives you the same functionality but works with product kits.