diff --git a/cart/includes/languages/english/YOUR_TEMPLATE/index.php b/cart/includes/languages/english/YOUR_TEMPLATE/index.php deleted file mode 100644 index a4425f6..0000000 --- a/cart/includes/languages/english/YOUR_TEMPLATE/index.php +++ /dev/null @@ -1,65 +0,0 @@ -/includes/languages/english/index.php'); - -// values for compare system - define('COMPARE_DEFAULT', 'Compare'); - define('COMPARE_REMOVE', 'remove'); - define('COMPARE_COUNT_START', 'up to '); - define('COMPARE_COUNT_END', ' items'); - -// Showcase vs Store -if (STORE_STATUS == '0') { - define('TEXT_GREETING_GUEST', 'Welcome Guest! Would you like to log yourself in?'); -} else { - define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.'); -} - -define('TEXT_GREETING_PERSONAL', 'Hello %s! Would you like to see our newest additions?'); - -define('TEXT_INFORMATION', 'Define your main Index page copy here.'); - -//moved to english -//define('TABLE_HEADING_FEATURED_PRODUCTS','Featured Products'); - -//define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); -//define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); -//define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); - -if ( ($category_depth == 'products') || (zen_check_url_get_terms()) ) { - // This section deals with product-listing page contents - define('HEADING_TITLE', 'Available Products'); - define('TABLE_HEADING_IMAGE', 'Product Image'); - define('TABLE_HEADING_MODEL', 'Model'); - define('TABLE_HEADING_PRODUCTS', 'Product Name'); - define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); - define('TABLE_HEADING_QUANTITY', 'Quantity'); - define('TABLE_HEADING_PRICE', 'Price'); - define('TABLE_HEADING_WEIGHT', 'Weight'); - define('TABLE_HEADING_BUY_NOW', 'Buy Now'); - define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); - define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); - define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); - define('TEXT_SHOW', 'Filter Results by:'); - define('TEXT_BUY', 'Buy 1 \''); - define('TEXT_NOW', '\' now'); - define('TEXT_ALL_CATEGORIES', 'All Categories'); - define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); -} elseif ($category_depth == 'top') { - // This section deals with the "home" page at the top level with no options/products selected - /*Replace this text with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/ - define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.'); -} elseif ($category_depth == 'nested') { - // This section deals with displaying a subcategory - /*Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/ - define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.'); -} -?> \ No newline at end of file diff --git a/cart/includes/modules/YOUR_TEMPLATE/product_listing.php b/cart/includes/modules/YOUR_TEMPLATE_NAME/product_listing.php similarity index 74% rename from cart/includes/modules/YOUR_TEMPLATE/product_listing.php rename to cart/includes/modules/YOUR_TEMPLATE_NAME/product_listing.php index da572e0..c50f749 100644 --- a/cart/includes/modules/YOUR_TEMPLATE/product_listing.php +++ b/cart/includes/modules/YOUR_TEMPLATE_NAME/product_listing.php @@ -12,12 +12,28 @@ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } +// Column Layout Support originally added for Zen Cart v 1.1.4 by Eric Stamper - 02/14/2004 +// Upgraded to be compatible with Zen-cart v 1.2.0d by Rajeev Tandon - Aug 3, 2004 +// Column Layout Support (Grid Layout) upgraded for v1.3.0 compatibility DrByte 04/04/2006 +// +if (!defined('PRODUCT_LISTING_LAYOUT_STYLE')) define('PRODUCT_LISTING_LAYOUT_STYLE','rows'); +if (!defined('PRODUCT_LISTING_COLUMNS_PER_ROW')) define('PRODUCT_LISTING_COLUMNS_PER_ROW',3); +$row = 0; +$col = 0; +$list_box_contents = array(); +$title = ''; + +$max_results = (PRODUCT_LISTING_LAYOUT_STYLE=='columns' && PRODUCT_LISTING_COLUMNS_PER_ROW>0) ? (PRODUCT_LISTING_COLUMNS_PER_ROW * (int)(MAX_DISPLAY_PRODUCTS_LISTING/PRODUCT_LISTING_COLUMNS_PER_ROW)) : MAX_DISPLAY_PRODUCTS_LISTING; + $show_submit = zen_run_normal(); $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page'); $zco_notifier->notify('NOTIFY_MODULE_PRODUCT_LISTING_RESULTCOUNT', $listing_split->number_of_rows); $how_many = 0; +// Begin Row Layout Header +if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') { // For Column Layout (Grid Layout) add on module + $list_box_contents[0] = array('params' => 'class="productListing-rowheading"'); $zc_col_count_description = 0; @@ -72,11 +88,32 @@ 'text' => $lc_text ); } +} // End Row Layout Header used in Column Layout (Grid Layout) add on module + +///////////// HEADER ROW ABOVE ///////////////////////////////////////////////// + +$num_products_count = $listing_split->number_of_rows; + if ($listing_split->number_of_rows > 0) { $rows = 0; + // Used for Column Layout (Grid Layout) add on module + $column = 0; + if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') { + if ($num_products_count < PRODUCT_LISTING_COLUMNS_PER_ROW || PRODUCT_LISTING_COLUMNS_PER_ROW == 0 ) { + $col_width = floor(100/$num_products_count) - 0.5; + } else { + $col_width = floor(100/PRODUCT_LISTING_COLUMNS_PER_ROW) - 0.5; + } + // Used for Column Divider Pro add on + $col_width_div = floor(100); + } + // Used for Column Layout (Grid Layout) add on module + $listing = $db->Execute($listing_split->sql_query); $extra_row = 0; while (!$listing->EOF) { + + if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') { // Used in Column Layout (Grid Layout) Add on module $rows++; if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) { @@ -86,6 +123,9 @@ } $cur_row = sizeof($list_box_contents) - 1; + } // End of Conditional execution - only for row (regular style layout) + + $product_contents = array(); // Used For Column Layout (Grid Layout) Add on module for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; @@ -96,7 +136,11 @@ break; case 'PRODUCT_LIST_NAME': $lc_align = ''; - $lc_text = '

' . $listing->fields['products_name'] . '

' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '
'; + if (isset($_GET['manufacturers_id'])) { + $lc_text = '

' . $listing->fields['products_name'] . '

' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '
' ; + } else { + $lc_text = '

' . $listing->fields['products_name'] . '

' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '
'; + } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; @@ -169,11 +213,15 @@ break; } + $product_contents[] = $lc_text; // Used For Column Layout (Grid Layout) Option + + if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') { $list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } - + } + // add description and match alternating colors //if (PRODUCT_LIST_DESCRIPTION > 0) { // $rows++; @@ -187,6 +235,19 @@ // $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"', // 'text' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION)); //} + + // Following code will be executed only if Column Layout (Grid Layout) option is chosen + if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') { + $lc_text = implode('
', $product_contents); + $list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back"' . ' ' . 'style="width:' . $col_width_div . '%;"', + 'text' => $lc_text); + $column ++; + if ($column >= PRODUCT_LISTING_COLUMNS_PER_ROW) { + $column = 0; + $rows ++; + } + } + // End of Code fragment for Column Layout (Grid Layout) option in add on module $listing->MoveNext(); } $error_categories = false; diff --git a/cart/includes/modules/YOUR_TEMPLATE/product_listing.php.ih b/cart/includes/modules/YOUR_TEMPLATE_NAME/product_listing.php.ih similarity index 100% rename from cart/includes/modules/YOUR_TEMPLATE/product_listing.php.ih rename to cart/includes/modules/YOUR_TEMPLATE_NAME/product_listing.php.ih diff --git a/cart/includes/templates/YOUR_TEMPLATE/css/stylesheet_compare.css b/cart/includes/templates/YOUR_TEMPLATE_NAME/css/stylesheet_compare.css similarity index 100% rename from cart/includes/templates/YOUR_TEMPLATE/css/stylesheet_compare.css rename to cart/includes/templates/YOUR_TEMPLATE_NAME/css/stylesheet_compare.css diff --git a/cart/includes/templates/YOUR_TEMPLATE/jscript/jscript_jquery161.js b/cart/includes/templates/YOUR_TEMPLATE_NAME/jscript/jscript_jquery161.js similarity index 100% rename from cart/includes/templates/YOUR_TEMPLATE/jscript/jscript_jquery161.js rename to cart/includes/templates/YOUR_TEMPLATE_NAME/jscript/jscript_jquery161.js diff --git a/cart/includes/templates/YOUR_TEMPLATE/jscript/jscript_products_compare.js b/cart/includes/templates/YOUR_TEMPLATE_NAME/jscript/jscript_products_compare.js similarity index 100% rename from cart/includes/templates/YOUR_TEMPLATE/jscript/jscript_products_compare.js rename to cart/includes/templates/YOUR_TEMPLATE_NAME/jscript/jscript_products_compare.js diff --git a/cart/includes/templates/YOUR_TEMPLATE/templates/tpl_compare_default.php b/cart/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_compare_default.php similarity index 100% rename from cart/includes/templates/YOUR_TEMPLATE/templates/tpl_compare_default.php rename to cart/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_compare_default.php diff --git a/cart/includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php b/cart/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_index_product_list.php similarity index 100% rename from cart/includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php rename to cart/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_index_product_list.php