Closed (works as designed)
Project:
Commerce Core
Version:
7.x-1.3
Component:
Developer experience
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 May 2012 at 11:12 UTC
Updated:
13 Jun 2015 at 17:01 UTC
Jump to comment: Most recent
Comments
Comment #1
vasikecan you provide some screenshots with right descriptions, please?
I'm not sure about your issue here, but i can say that the Product attributes deals with Product data and not the Product Display-Node.
So maybe you have to work on Product entities instead of nodes.
Comment #2
rszrama commentedActually, if I understand right, since we're using field_view_field() to render fields on the AJAX refresh, you should be able to do what you want through the appropriate prepare_view field hooks.
Comment #3
fernly commentedThanks both vasike and Ryan. The reloading of the fields is indeed getting its data straight from the entity and by this 'bypassing' any node related functions if you can put it that way. Like Ryan says, some entity field functions can provide the functionality to solve this 'issue'.
Comment #4
drupalreggie commentedI'm experiencing a problem related to this issue.
On some of my product pages I have a dynamically generated link: [site:login-url]?destination=[current-page:url:path]
This allows the user to login and be returned to the product page afterwards.
Only problem is after a product attribute is changed the dynamically generated link URL becomes: user?destination=system/ajax
I know there is an option in commerce to force users to login before checking out but this is not the functionality I am looking for. These are custom product pages which contain links to external payment providers (GoCardless - to handle the dreaded recurring payment problem) so at the moment I do specifically feel that I need this functionality.
Any ideas on a work around this?
Cheers,
Comment #5
Marko B commentedWith some hook_field_attach_view_alter you can preprocess field output one by one. What I needed is to preprocess this whole group of data, add to cart form basically that consists attributes and add to cart button. To do that the only way to make it work with AJAX is with form alter. So change the forms data in
function my_custom_form_commerce_cart_add_to_cart_form_alter(&$form, &$form_state) {and you can probably get what you need. Think this is the only way.