GOOGLE ADWORD - FREE $75 VOUCHER

TAKE IT NOW!! It will not last too long!

  • Send up to 20.000 EMAILS on HIGH SPEED SERVER
  • Publish your business and websites for free
  • Publish your products - direct links to your products
  • Create as many links to your websites as you wish, there is NO "no follow"directive !
  • Drag into your pages YouTube video and Images from the internat as easy as copy & paste the URL or drag & drop the image

Ask for your 3o DAYS free trial
and get $75 GOOGLE ADWORDS VOUCHER FOR FREE

You will be taken to a registration page - Please write that you wish to get BUSINESS CONNECTION FREE TRIAL

There is no catch, just launching a comprehensive business oriented web marketing tool.
Some of our readers will be lucky. BE ONE OF THEM!

Add to Cart flow – ZenCart

Table used:

TABLE_CUSTOMERS_BASKET – customers_basket
Structure:
customers_basket_id int(11) No None auto_increment
customers_id int(11) No 0
products_id tinytext latin1_swedish_ci No None
customers_basket_quantity float No 0
final_price decimal(15,4) No 0.0000
customers_basket_date_added varchar(8)

TABLE_CUSTOMERS_BASKET_ATTRIBUTES – customers_basket_attributes
Structure:
customers_basket_attributes_id int(11) No None auto_increment
customers_id int(11) No 0
products_id tinytext latin1_swedish_ci No None
products_options_id varchar(64) latin1_swedish_ci No 0
products_options_value_id int(11) No 0
products_options_value_text blob BINARY Yes
products_options_sort_order text

How it works

1) includes/auto_loaders/config.core.php
Here is initialized cart class
Look for:
$autoLoadConfig[80][] = array(‘autoType’=>’classInstantiate’,
‘className’=>’shoppingCart’,
‘objectName’=>’cart’,
‘checkInstantiated’=>true,
‘classSession’=>true);

2) includes/classes/shopping_cart.php
Here is defined cart class -auto loaded see 1

3) includes/templates/olala1/templates/tpl_product_info_display.php
This is the place where all data are send when user ADD TO CART.
Variable are sent using:
- POST mechanism: all details about products
- GET mechanism: “action” which will fire the add to cart procedure
The line will tell you all about this is :
<form name=”cart_quantity” action=”http://www.yourshop.com/essential-gear-cylinders-c-1_18/cylinder-only-s-80-cubic-foot-11-1-ltr-207-bar-p-4418:7dfe81c126653b69bc6c02f15dd3c7f1?action=add_product” method=”post” enctype=”multipart/form-data”>

4) includes/init_includes/init_cart_handler.php
Based on action value it take the control and execute spcific actions.
It this case actionAddProduct defined in cart class is executed:

$_SESSION['cart']->actionAddProduct($goto, $parameters);

If user is logged in, cart tables are populated.

If the user is not logged in cart session variable is pupulated.

267 $this->contents[] = array($products_id);
$this->contents[$products_id] = array(‘qty’ => (float)$qty);

Once action is executed, in /includes/modules/pages/shoppingcart/header.php
59 $flagAnyOutOfStock = false;
$products = $_SESSION['cart']->get_products();
which is taken from includes/classes/shopping_cart.php

#1100 function get_products($check_for_valid_cart = false) {

If user is logged in will be executed:
if($_SESSION['customer_id']) {
$customer_group_query = “select gp.group_name
from ” . TABLE_CUSTOMERS . ” cu
left join ” . TABLE_GROUP_PRICING . ” gp on cu.customers_group_pricing=gp.group_id
where cu.customers_id = ” . $_SESSION['customer_id'];
if($customer_group = $db->Execute($customer_group_query)) {
$customers_group=$customer_group->fields['group_name'];
}
}

If the user is not logged will be executed:.

#1128 $products_array = array();
reset($this->contents);
while (list($products_id, ) = each($this->contents)) {

“contents” is the session variable initialised at #267.

Random Posts

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Comment