who wants it? can we have it?

CommentFileSizeAuthor
#10 commerce-pricing-attr.jpg127.29 KBnelslynn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nchar’s picture

Status: Active » Needs review

Thanks for your suggestion Christopher! I think that it was a must have feature for this module so I created the functionality of AJAX price refresh immediately. I have committed the changes to the latest release so please try it and confirm that it works.

chriscalip’s picture

Tested on a sandbox with just a simple commerce setup. This currently works well. Got word from a colleague of mine that on a product display shows multi add2cart commerce forms .. this currently is not working. Testing that data.

chriscalip’s picture

Tested on a sandbox with a product display with multi add2cart commerce forms -- also currently working. So far so good.

chriscalip’s picture

Status: Needs review » Reviewed & tested by the community
nchar’s picture

Status: Reviewed & tested by the community » Closed (fixed)
robgreeniowa’s picture

In IE8, I'm getting a pop-up message, "An error occurred while attempting to process /system/ajax" whenever the price attempts to change after selecting a differently priced item in the product dropdown. Possibly related to the order of processing ActiveX and XMLHttpRequest?

yannisc’s picture

Status: Closed (fixed) » Needs work
nchar’s picture

Status: Needs work » Postponed (maintainer needs more info)

I can't reproduce the error. It works for me in internet explorer 8. It is possible to be caused by another module. Please give me more information.

nelslynn’s picture

Here's the issue I'm having with the Ajax price change. To reproduce:

  1. Configure 2 or more product variations (products with SKUs)
  2. Configure one or more pricing attributes, as this module provides, and add them to each of the products set up in step 1
  3. Add the two or more product variations to a product display node
  4. On the node just configured (as a user), select a product variation (SKU), then one or more options configured with Commerce Pricing Attributes
  5. The Price changes as expected
  6. Now change the to another product variation (SKU) without leaving the page
  7. Heres the bug: Price changes to the price of the SKU without considering the price of the option(s) selected with the original SKU, AND the attribute does not change, so the price indicated is now wrong. Either all attributes need to go back to '- None -' when a user changes the SKU, or the price needs to be calculated based on the new SKU selected plus the attributes selected.

Awesome module otherwise, thanks!

nelslynn’s picture

Category: feature » bug
Status: Postponed (maintainer needs more info) » Needs work
FileSize
127.29 KB

Changing status. See previous post about how to reproduce this bug. Also adding screenshot.

flapsjack’s picture

I would also like to add that if you have more than one pricing attribute that it is possible to create a similar ajax bug. If you choose one of the pricing attributes and while the ajax callback is firing, you immediately choose the other option that also changes the price, the second ajax request does the new price calculation based on the current base price. And since the current base price doesn't include the first ajax request change, then you can end up with 2 pricing attributes active, but not have the price reflect the correct combination of both pricing attributes.

I will look at the actual javascript code shortly, but I would assume a simple "running" flag could be set causing subsequent requests to block until the first completes. It seems like serializing the requests should solve this issue.

flapsjack’s picture

nelslynn,

Since you have done some digging and are familiar with this module, you are probably experiencing or will experience the bug I mentioned here:

http://drupal.org/node/1957076

Basically, the problem is that the pricing attributes stop working when you click the product from the cart and go into "edit" mode. The required commerce product attributes module allows the customer to edit their cart and have all of their customization options remembered. Unfortunately, the pricing attribute options are not properly remembered on edit.

Have you noticed this or are you working around it somehow?

nelslynn’s picture

flapsjack,

I'm not allowing the user to edit the product from the cart. The bug you refer to makes it too confusing to the user, so until that is fixed, I'm not allowing a link to the product from the cart. Whether these two issues are related, I don't know.

My bug report pertains to when the user wants to change a product variation (SKU) while still on the product page. The ajax price change does not calculate current selected attribute price into the price display. The price when added to the cart is correct.

Anybody’s picture

Is this also working for text fields (custom input)?

I have custom fields for a "length" value that is required for price calculation. Can I else trigger the calculation manually on changing focus?

mikeaja’s picture

Title: Commerce Pricing Attributes Ajax Price Change » Price change not kept / select list not returning to default after changing variation
Priority: Normal » Critical
Issue summary: View changes

deleted

mikeaja’s picture

Title: Price change not kept / select list not returning to default after changing variation » Commerce Pricing Attributes Ajax Price Change
Priority: Critical » Normal
mikeaja’s picture

Status: Needs work » Closed (fixed)
Anybody’s picture

Is there any hint on #14? Any chance to trigger manually via JavaScript? No support for normal text input fields?

mikeaja’s picture

This should be a new feature request. The thread request is fixed.