Jump to content

 

rcaubin

Member Since 11 Jul 2008
Offline Last Active Nov 19 2008 08:08 PM
-----

Topics I've Started

Crazyegg.com - Site User Interatction Stats Tracking

07 August 2008 - 06:19 AM

Check it out, especially the heat map... Include one line of Javascript in your website for some really NEAT stats :)

Tip: How to program a cs-cart 1.35sp3 addon

07 August 2008 - 06:04 AM

Hi everyone,

I'm in the middle of an extremely large project with multiple addons being developed to extend the administration and customer sides of cs-cart.

Because staying withing budget is always a priority, I took it upon myself to learn how to create an addon that is accessible in the admin settings section and that is designed to extend existing cs-cart functionality, such as the user authentication system, the categories and product systems.

Some of my discoveries include...

* How the "had to look to find it" /admin.php?target=settings_dev file is used to add new addons and extend cs-cart with new and additional settings that are definable within the administration web interface.

* 75 existing cs-cart module areas that allow ANY addon to plug into it. This is how the Listmania addon shows up everywhere (Categories, Products, Pages, etc...)

* How an addon can register itself to be included in any of the 75 module addon areas mentioned above by creating only 1 php file.

* Core cs-cart functionality that handle data manipulation between the user interface, the template system, the shopping cart programing logic, the database and finally the user (admin, customer, mail and partner)

* 2 files that are automatically loaded with any active addon that allows you to first define the configuration data that your addon program needs to function properly and the necessary php functions that interact with the cs-cart system and your addon.

* The necessary folder structure that is needed for your addon code and skin/template files.

* And a few other intersting discoveries with the template system for addons as well.

I'm not sure how long this current cs-cart version will be in place, but I'll try post a follow up to this post shortly on the step-by-step process I'll be using to create addons for cs-cart 1.35sp3.

Let me know if you're interested in that.

ATTN 1.35sp3 DEVS: Import ANY xml or csv datafeeds

31 July 2008 - 05:49 PM

The current functionality of the import functionality forces us to predefine an external csv file that has predefined fields, etc..

Using an affordable 3rd party script that I recently found (~ $90 USD) we'll be able import any datafeed from any source (url, server, filesystem) in php, it will iterate through a list of "record" objects, no matter what the source file is.

Each record has a key and a value (field/value)
You can also access specific information about a record by providing a key value.

This would allow the creation of datafeed import profiles that would contain information as to the file location, the mapping information between [database product, image and feature fields] and the datafeed fields.

If you'd be interested in developing this type of admin addon, please get in touch with for specific requirements.

1.35sp3 Mod: How to turn off category products from showing.

28 July 2008 - 11:57 PM

Total Steps: 4
Degree of Difficulty: easy to moderate
Files to be modified: 2

In order to use a "custom" landing page for categories, some of the default functionality would need to be disabled, such as the displaying of products.

Creating a custom landing page can be as easy as adding the appropriate html code to the Full Description of any category.

Here's the method I used to create "Show Products?" option for each category.
Note: this method can be used to apply other settings to categories.

Step 1. Create a language variable: show_products

---
Step 2. Create a new field in the cscart database table: cscart_categories with the following parameters

1. Field show_products
2. Type: CHAR
3. Default: Y

---
Step 3. File Modification: (1 of 2):
[skin]/admin/categories_pages/categories_update.tpl
(I'm using default blue for this example)

find this:
{if $settings.Addons.discussion == "Y"}
 {include file="addons/discussion/allow_discussion.tpl" object_id=$category_data.category_id object_type="C" title=$lang.discussion_title_category}
{/if}

add this after the above code:

<tr>
<td class="field-name" nowrap>{$lang.show_products}:</td>
<td> </td>
<td>
<select name="category_data[show_products]">
<option value="Y" {if $category_data.show_products == 'Y'}selected="selected"{/if}>{$lang.yes}</option>
<option value="N" {if $category_data.show_products == 'N'}selected="selected"{/if}>{$lang.no}</option>
</select>
</td>
</tr>


---
Step 4. File Modification: (2 of 2)
[skin]/customer/categories_pages/categories.tpl

find this:
{if $products}
{if $settings.Appearance.columns_in_products_list > 1}
	{include file="products_pages/products_multicolumns.tpl" columns=$settings.Appearance.columns_in_products_list}
{elseif $settings.Appearance.advanced_products_list == 'Y' && $client_env.is_javascript == 'Y'}
	{include file="products_pages/products_advanced.tpl" title=""}
{else}
	{include file="products_pages/products.tpl" title=""}
{/if}

{elseif !$subcategories}
<p align="center"><b>{$lang.text_no_products}</b></p>
{/if}
replace with this this:

{if $category_data.show_products == "Y"}
{if $products}
{if $settings.Appearance.columns_in_products_list > 1}
	{include file="products_pages/products_multicolumns.tpl" columns=$settings.Appearance.columns_in_products_list}
{elseif $settings.Appearance.advanced_products_list == 'Y' && $client_env.is_javascript == 'Y'}
	{include file="products_pages/products_advanced.tpl" title=""}
{else}
	{include file="products_pages/products.tpl" title=""}
{/if}

{elseif !$subcategories}
<p align="center"><b>{$lang.text_no_products}</b></p>
{/if}
{/if}

Help with custom Addon (maybe community project)

24 July 2008 - 08:56 AM

It seems to be extremely difficult to find adequate information on how to extend Cs-Cart with custom addons.

I'm an able coder and would like to start writing some addons I've alerady thought about.

However, I'm unable to decipher the necessary steps to creating an addon that works within CS-cart.

If anyone knows anyting about creating addons, please reply to this thread.

Once I figure it out, i'll write a step-by-step guide for the version I'm working with at the time.