Both sides previous revisionPrevious revisionNext revision | Previous revision |
v:1.0:javascript [2013/01/13 02:18] – [Mini-Cart Display and HTML Helper Functionality] adam | v:1.0:javascript [2017/04/26 07:02] (current) – external edit 127.0.0.1 |
---|
| |
===== How It Works & Configuration ===== | ===== How It Works & Configuration ===== |
While most of this should happen automatically, especially if you're using the ''foxycart.js'' or ''foxycart.complete.js'' versions (as opposed to the ''foxycart.raw.js''), there are a few things that need to be configured correctly. | While most of this should happen automatically, especially if you're using the ''foxycart.js'' or ''foxycart.colorbox.js'' versions (as opposed to the ''foxycart.raw.js''), there are a few things that need to be configured correctly. |
| |
==== ''storedomain'': How Your Links and Forms Are Handled ==== | ==== ''storedomain'': How Your Links and Forms Are Handled ==== |
==== ''postprocess'': After the Add-To-Cart ==== | ==== ''postprocess'': After the Add-To-Cart ==== |
=== What It Is === | === What It Is === |
The ''postprocess'' event is //not called directly// by ''foxycart.js'', but is available to use if you need it. This can be useful, for example, if you want to refresh the ''FC.json'' when your modal window is closed, as is the case with the default ''foxycart.complete.js''. | The ''postprocess'' event is //not called directly// by ''foxycart.js'', but is available to use if you need it. This can be useful, for example, if you want to refresh the ''FC.json'' when your modal window is closed, as is the case with the default ''foxycart.colorbox.js''. |
=== How It Works: Overview === | === How It Works: Overview === |
Just like the ''preprocess'' and ''process'', you can add multiple functions to the ''postprocess'' even. Notice the call to ''postprocess'' in the ''process'' example above, in the ''onClosed'' parameter. That's telling Colorbox to run the ''postprocess'' events when the modal window is closed. If we add a function like below, then the ''cart_update()'' method will be called (which refreshes the ''FC.json'' and updates the "minicart" helper functions). | Just like the ''preprocess'' and ''process'', you can add multiple functions to the ''postprocess'' even. Notice the call to ''postprocess'' in the ''process'' example above, in the ''onClosed'' parameter. That's telling Colorbox to run the ''postprocess'' events when the modal window is closed. If we add a function like below, then the ''cart_update()'' method will be called (which refreshes the ''FC.json'' and updates the "minicart" helper functions). |