Rich-text Reply

Preselected Item not refreshing in Cart summary

juliofarfan 05-25-15

Preselected Item not refreshing in Cart summary

[ Edited ]

I'm preselecting a list item when the page loads, even if it appears selected, the cart is not refreshing.

 

Aknowledgments

I have a <Select> list and I select the item 1 when it loads

    I tried...
              $(this).prop("selectedIndex", 1);
              $(this)[0].selectedIndex = 1;

    None of them seems to update the cart

 

If there's no option to "refresh" or "notify" the page that the item has changed I have been looking to reach something like the next image.

 

As you can see "Web: 0.00" seems to be focused (it is not), is there any function in "select" elements to accomplish this? 

 

12.PNG

 

NOTE: The item is selected successfully but the cart widget(which is in the same page) doesnt seem to know it has already changed

 

 



 

JDahlinANF 05-26-15
 

Re: Preselected Item not refreshing in Cart summary

Could be a timing issue...
From your description is sounds like the second list is supposed to update when an item in the first list is selected. Also, it sounds like you are able to select an item in the first list. If so, then your "onchange" event might not be defined yet.
juliofarfan 05-28-15
 

Re: Preselected Item not refreshing in Cart summary

The item I need to select is actually selecting  but it is no refreshing on the cart widget, as if the webpage doesnt know there has been already a change.

Aicke 05-29-15
 

Re: Preselected Item not refreshing in Cart summary

I would check on which event the cart updates, e.g. if the widgets listens on a click event on the select, a value change of the select will not trigger an update.

You may see the attached events with
1. Firefox Dev Tools (not Firebug): beside the select should be a [EV] icon which lists all attached events and who watches them, if you click on that icon.
2. Chrome Dev Tools: select an element and switch to the "event listeners" tab
Everything is hard, before it is easy.
Level 2