Documentation You are here: start » v » 1.0 » javascript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v:1.0:javascript [2013/01/13 02:17] – [Mini-Cart Display and HTML Helper Functionality] adamv:1.0:javascript [2017/04/26 07:02] (current) – external edit 127.0.0.1
Line 35: Line 35:
  
 ===== 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 ====
Line 78: Line 78:
  
 <code html><a href="https://yourdomain.foxycart.com/cart?cart=view" id="fc_minicart"> <code html><a href="https://yourdomain.foxycart.com/cart?cart=view" id="fc_minicart">
- My Cart: <span id="fc_quantity">0</span> <span id="fc_total_price">$0.00</span>+ <span id="fc_quantity">0</span> 
 + <span id="fc_singular"> item </span> 
 + <span id="fc_plural"> items </span> in cart
 </a></code> </a></code>
 ==== ''session_get'' Appending the FCSID to Requests ==== ==== ''session_get'' Appending the FCSID to Requests ====
Line 232: Line 234:
 ==== ''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).

Site Tools