User Tools

Site Tools


public:cs-cart

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
public:cs-cart [2014/02/17 02:51] squirespublic:cs-cart [2014/03/03 05:34] (current) squires
Line 1: Line 1:
 +====== CS-Cart ======
  
-===== Design =====+===== Directory Structure ===== 
 + 
 +Most of the info on the CS-Cart website and forums about where certain files are located is wrong, because they have been changing the directory structure in every version. 
 + 
 +This information is for version 4.1.2. 
 + 
 +Themes repository. Originals are kept here. (I think.) When an addon is installed, its template files are copied from the repository area into the design area. When it is uninstalled, they are deleted from the design area. 
 + 
 +  * var 
 +     * themes_reopository 
 +        * basic 
 + 
 +Design directory. These are the templates that are actually used. 
 + 
 +  * design 
 +     * themes 
 +        * basic 
 + 
 +===== Execution Path ===== 
 + 
 +index 
 +init 
 +config setup 
 + 
 +fn_dispatch (fn.control.php) 
 +  * determines all controllers that need to run, including addons and pre- and post-hooks 
 +  * calls fn_run_controller() for each 
 +  * calls $view->display(Registry::get('runtime.root_template')) (where root_templates=index.tpl) 
 +    * since all the controllers have run at this time, all smarty variable assignments should be ready 
 + 
 +==== Form Submission ==== 
 + 
 +Javascript event ce.formpost_[form_name] is triggered after validation and before form is posted. Returning false will cancel the submission. 
 + 
 +===== User Interface =====
  
 ==== Cache ==== ==== Cache ====
  
 Clear the cache in v4 by appending ?ctpl&cc to the admin.php URI. Clear the cache in v4 by appending ?ctpl&cc to the admin.php URI.
 +
 +==== Template Hooks ====
 +
 +Occasionally the templates contain hooks where one can prepend, append, or replace templates.
  
 ==== Template Override ==== ==== Template Override ====
  
-Suggested way for overriding an entire template is to edit the originalputting hook around the entire thingThen override the hook.+The hooks are generally only found where the developers needed to put them to develop their built-in addons. More often, you'll find you need to replace an entire template. You won't easily discover this method by looking at the built-in addons, because the developers have added hooks so that they don't need to override template files. 
 + 
 +==== Template Engine ==== 
 + 
 +'view' entry in the registry (Registry::get('view')) is an instance of SmartyCore (setup in fn.init.php). 
 + 
 +==== Template Javascript ==== 
 + 
 +For templates that are added to the page via ajax calls, embedded scripts are not executed. However, a 'ce.commoninit' event is triggered, which scripts can subscribe to. 
 + 
 +<code> 
 +$.ceEvent('on', 'ce.commoninit', function(context) { 
 +  // code here 
 +}); 
 +</code>
  
 ===== Code / Addons ===== ===== Code / Addons =====
Line 135: Line 188:
 fn_format_price() fn_format_price()
  
 +===== Resources =====
  
 +http://www.hungryweb.net/cs-cart-tutorials/how-to-modify-cs-cart-checkout-step-1-for-a-better-user-experience.html
  
 +http://forum.cs-cart.com/topic/34038-trying-to-override-a-tpl-file-using-my-changes-add-on/page__view__findpost__p__173233
  
public/cs-cart.1392605479.txt.gz · Last modified: 2014/02/17 02:51 by squires

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki