User Tools

Site Tools


tutorials:zencartmods:tabs.html

This is an old revision of the document!


Theres a few mods out there like this one that let your zen cart products have tabs. We needed something slightly more cutom (we have some weird tabs) we made a simple mod for ourselves.

DB changes

We'll start by making a tab called "tutorials". Just duplicate these directions and replace "tutorials" with anything else to make ome other tabs as well.

ALTER TABLE `products_description` ADD `products_tutorials`  TEXT NOT NULL ;

Admin mods

Just like in the Tariff mod, add the new sql field to admin/includes/modules/product/collect_info.php

$parameters = array('products_name' => '',
		       'products_description' => '',
		       'products_tutorials' => '',
                       'products_url' => '',
		       'products_id' => '',
		       'products_quantity' => '',
		       'products_model' => '',
		       'products_image' => '',
		       'products_price' => '',
		       'products_virtual' => DEFAULT_PRODUCT_PRODUCTS_VIRTUAL,
		       'products_weight' => '',
		       'products_date_added' => '',
		       'products_last_modified' => '',
		       'products_date_available' => '',
		       'products_status' => '',
		       'products_tax_class_id' => DEFAULT_PRODUCT_TAX_CLASS_ID,
		       'manufacturers_id' => '',
		       'products_quantity_order_min' => '',
		       'products_quantity_order_units' => '',
		       'products_priced_by_attribute' => '',
		       'product_is_free' => '',
		       'product_is_call' => '',
		       'products_quantity_mixed' => '',
		        'product_is_always_free_shipping' => DEFAULT_PRODUCT_PRODUCTS_IS_ALWAYS_FREE_SHIPPING,
		        'products_qty_box_status' => PRODUCTS_QTY_BOX_STATUS,
		        'products_quantity_order_max' => '0',
                        'products_sort_order' => '0',
                        'products_discount_type' => '0',
		        'products_discount_type_from' => '0',
                        'products_price_sorter' => '0',
                        'master_categories_id' => '',
                        'products_backorder_allowed' => 1,
                        'product_customs' => '',
                        'products_tariff_country' => 0,
                        'products_tariff' => '',
                        'products_fragile' => '',
			'products_upc' => '',
			'products_isbn' => ''
		       );
 
    $pInfo = new objectInfo($parameters);
 
    if (isset($_GET['pID']) && empty($_POST)) {
      $product = $db->Execute("select pd.products_name, pd.products_description, pd.products_tutorials, pd.products_url,                                                                                                
                                      p.products_id, p.products_quantity, p.products_model,                                                                                                                                                                                   
                                      p.products_image, p.products_price, p.products_virtual, p.products_weight,                                                                                                                                                              
                                      p.products_date_added, p.products_last_modified,                                                                                                                                                                                        
                                      date_format(p.products_date_available, '%Y-%m-%d') as                                                                                                                                                                                   
                                      products_date_available, p.products_status, p.products_tax_class_id,                                                                                                                                                                    
                                      p.manufacturers_id,                                                                                                                                                                                                                     
                                      p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,                                                                                                                                         
                                      p.product_is_free, p.product_is_call, p.products_quantity_mixed,                                                                                                                                                                        
                                      p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max,                                                                                                                                            
                                      p.products_sort_order,                                                                                                                                                                                                                  
                                      p.products_discount_type, p.products_discount_type_from,                                                                                                                                                                                
                                      p.products_price_sorter, p.master_categories_id,                                                                                                                                                                                        
                                      p.products_backorder_allowed, p.product_customs, p.products_tariff_country , p.products_tariff , p.products_fragile, p.products_upc, p.products_isbn                                                                                    
                              from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd                                                                                                                                                                            
                              where p.products_id = '" . (int)$_GET['pID'] . "'                                                                                                                                                                                               
                              and p.products_id = pd.products_id                                                                                                                                                                                                              
                              and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
/home/ladyada/public_html/wiki/data/attic/tutorials/zencartmods/tabs.html.1313075369.txt.gz · Last modified: 2016/01/28 18:05 (external edit)