Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 09-26-2012 03:04:41

htw_simon
Member
From: UK
Registered: 11-20-2007
Posts: 83
Website

Manually initiate priceAutoUpdate

I have a calculation script that updates the quantity field on the product detail page based on the value of another input field. Is there a way I can manually call the priceAutoUpdate to update the price as it only currently seems to work on keyup when editing the quantity field directly.

Thanks,
Simon

Offline

 

#2 09-26-2012 11:14:14

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Manually initiate priceAutoUpdate

Sure.  In your product detail display includes (Desktop and Mobile), edited under:

Store > Store Displays > Product Detail Displays

Add this code to the bottom right before the closing PHP tag:

Code:

     $js_docready = 'priceAutoUpdate({\'formid\': \'' . $formid . '\', \'inputid\': \'' . $inputid . '\'});';

     $this->append_global_array('core.js_docready',$js_docready);

Nick Hendler

Offline

 

#3 09-27-2012 07:15:30

htw_simon
Member
From: UK
Registered: 11-20-2007
Posts: 83
Website

Re: Manually initiate priceAutoUpdate

Awesome, thanks Nick.

Simon

Offline

 

Board footer