Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Get Current Value Of Product Options Rate Topic   - - - - -

 
  • jamesg
  • Member
  • Trial users
  • Join Date: 07-Nov 16
  • 25 posts

Posted 21 May 2020 - 09:27 AM #1

Hi All.

Im using a smarty block in a product tab.

I am trying to display the currently selected values for some of the options but even when the options are changed they do not seem to update their current value.

 

I have tried the following.

Used Javascript to get the current selected value of the item when it is changed. This just always shows the initial value. when i change the option choice it seems to refresh the form and then revert back to the original value even though the selected item is shown in the dropdown box. i have tried using javascript to force the "Selected" text to the value that is chosen. i can see in console that the "selected" text moves but then reverts back to the initial value again.

 

I have tried using the smarty variables to show the product option for the value in the array for the $products.prodcut_options[19].value but it never changes. and also to show from $products.selected_options again never changes.

 

i have used the debug mode to watch the values and even when changing the option they do not change. i presume that the must only update once the item is added to cart?

 

Is there any way to achieve what i am trying to do?

Many Thanks

James

 



 
  • jamesg
  • Member
  • Trial users
  • Join Date: 07-Nov 16
  • 25 posts

Posted 11 June 2020 - 11:17 AM #2

Is there any further information I could post to get any help with this?

many thanks

 



 
  • jamesg
  • Member
  • Trial users
  • Join Date: 07-Nov 16
  • 25 posts

Posted 25 October 2020 - 02:45 PM #3

Can anyone point me in the direction for help on this please? should i contact support or is this a paid development i should be looking for?

thanks



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12002 posts

Posted 26 October 2020 - 06:28 PM #4

Are you using JQuery or Javascript to access the elements?

Suggest you use an 'change' JQuery event to get the value when an element is changed.

Option updates and application of modifiers is generally an AJAX request. So if your section is within one of the result_ids on the product page then it will be refreshed from Smarty data in the template.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.