lightinthebox模板问题:到了搜索的页面,头部货币切换无法切换问题

June 3, 2011 by gbliang · 1,361 Comments
Filed under: zen cart 

到了搜索的页面 http://www.xxxx.com/index.php?main_page=advanced_search_result&inc_subcat=1&search_in_description=1&keyword=a 头部货币切换无法切换问题

找到文件 includes\templates\lightinthebox\templates\tpl_modules_header_right.php 修改 if($key != $_SESSION['currency']){ 下面部分为 $pageurls=$_SERVER["REQUEST_URI"]; $parse_url=parse_url($pageurls); if(isset($parse_url["query"])) $urldress = ‘&’; else $urldress = ‘?’; ?> get_template_dir($key.’.gif’, DIR_WS_TEMPLATE, $current_page_base,’images/icons/flag’). ‘/’.$key.’.gif’,$key,”,”,’ border=”0″‘);?>

Popularity: 38% [?]

zen cart lightinthebox 模板 首页中间部分推荐分类修改为推荐产品

June 3, 2011 by gbliang · 319 Comments
Filed under: zen cart 

找到 includestemplateslightintheboxtemplatestpl_index_categories.php 文件

大概 349行 找到

require($template->get_template_dir(‘tpl_modules_featured_category_row.php’,DIR_WS_TEMPLATE, $current_page_base,’templates’). ‘/tpl_modules_featured_category_row.php’);

替换为
require($template->get_template_dir(‘tpl_modules_featured_products.php’,DIR_WS_TEMPLATE, $current_page_base,’templates’). ‘/tpl_modules_featured_products.php’);

Popularity: 11% [?]

ligtinthebox模板 当产品有批量优惠的属性的时候,计价不正确的问题

June 3, 2011 by gbliang · 201 Comments
Filed under: zen cart 

找到includes\templates\lightinthebox\templates\ tpl_modules_products_quantity_discounts.php

大概50行

修改为

<?php

foreach($quantityDiscounts as $key=>$quantityDiscount) {
$pppp_i = $pppp_i+1;
$newquanticount=explode(“-”,$quantityDiscount['show_qty']);
if(preg_match(“/[^d-., ]/”,$newquanticount[0]))
{
$newquanticount=explode(“+”,$newquanticount[0]);
}
$ajax_prices = trim(eregi_replace(“[^0-9.]“,”",$currencies->display_price($quantityDiscount['discounted_price'], zen_get_tax_rate($products_tax_class_id))));
?>
<script type=”text/javascript”>
discount[<?php echo $pppp_i;?>] = “<?php echo $newquanticount[0];?>-<?php echo $ajax_prices; ?>-<?php echo zen_get_product_is_always_free_shipping((int)$_GET['products_id'])?1:0;?>-0″;
</script>
<tr>
<td align=”center” style=”border: 1px solid #ddd;”><?php echo $quantityDiscount['show_qty'];?> </td>
<td style=”border: 1px solid #ddd;”>
<?php
echo $currencies->display_price($quantityDiscount['discounted_price'], zen_get_tax_rate($products_tax_class_id));
?>
</td>
</tr>
<?php
$disc_cnt++;
if ($discount_col_cnt == $disc_cnt && !($key == sizeof($quantityDiscount))) {
$disc_cnt=0;
?>

<?php
}
}
?>

这样就会自动按批量优惠的价格计费

Popularity: 8% [?]

LIGHTINTHEBOX 模板 后台会员管理 报错 无法删除问题

March 3, 2011 by gbliang · 918 Comments
Filed under: zen cart 

登录后台后 直接在地址栏里 输入地址即可删除
http://www.XXXX.com/admin/customers.php?page=1&cID=会员前面的ID值& action=deleteconfirm

Popularity: 25% [?]

zen cart lightinthebox 模板搜索不准确的问题

March 3, 2011 by gbliang · 1,067 Comments
Filed under: zen cart 

找到 includesmodulespagesadvanced_search_resultheader_php.php 文件 只需要搜索产品名和型号
修改为

// This should be first line of the script:

$zco_notifier->notify(‘NOTIFY_HEADER_START_ADVANCED_SEARCH_RESULTS’);

if (!defined(‘KEYWORD_FORMAT_STRING’)) define(‘KEYWORD_FORMAT_STRING’,'keywords’);

require(DIR_WS_MODULES . zen_get_module_directory(‘require_languages.php’));

$error = false;

$missing_one_input = false;

$productsort = array();

$nsort = array(‘Bestselling’,'Item Name’,'Price(Low to high)’,'Price(High to low)’,'New Arrival’);

for ($i=1; $i<6; $i++) {

$productsort[] = array('id' => sprintf(‘-’, $i), ‘text’ =>$nsort[$i-1] );

}

$pagesize = array();

$pagesize[] = array(‘id’=>24,’text’=>24);

$pagesize[] = array(‘id’=>36,’text’=>36);

$pagesize[] = array(‘id’=>48,’text’=>48);

if(isset($_GET['productsort']) && (int)$_GET['productsort'] > 0){

switch ($_GET['productsort']){

case 2:

$product_sort = ” order by pd.products_name “;

break;

case 3:

$product_sort = ” order by p.products_price”;

break;

case 4:

$product_sort = ” order by p.products_price DESC”;

break;

case 5:

$product_sort = ” order by p.products_date_added DESC”;

break;

default:

$product_sort = ” order by p.products_ordered DESC”;

}

}

//print_r($_SERVER['QUERY_STRING']);

$display = isset($_GET['display'])? $_GET['display']: ’1′;

$listTypes = isset($_GET['listtypes']) ? $_GET['listtypes'] : 1;

if(isset($display)){

switch ($display){

case ’2′:

$displayOrder = ‘ and p.`product_is_wholesale` = 1′;

break;

case ’3′:

$displayOrder = ‘ and p.`product_is_always_free_shipping` = 1′;

break;

default:

$displayOrder = ”;

}

}

if (isset($_GET['min_price']) && isset($_GET['max_price'])){

$pricefilter = ” and p.`products_price` >= “.$_GET['min_price'] .” and p.`products_price` <= " . $_GET['max_price'];

}

$_GET['keyword'] = trim($_GET['keyword']);

if ( (isset($_GET['keyword']) && (empty($_GET['keyword']) || $_GET['keyword']==HEADER_SEARCH_DEFAULT_TEXT || $_GET['keyword'] == KEYWORD_FORMAT_STRING ) ) &&

(isset($_GET['dfrom']) && (empty($_GET['dfrom']) || ($_GET['dfrom'] == DOB_FORMAT_STRING))) &&

(isset($_GET['dto']) && (empty($_GET['dto']) || ($_GET['dto'] == DOB_FORMAT_STRING))) &&

(isset($_GET['pfrom']) && !is_numeric($_GET['pfrom'])) &&

(isset($_GET['pto']) && !is_numeric($_GET['pto'])) ) {

$error = true;

$missing_one_input = true;

$messageStack->add_session(‘search’, ERROR_AT_LEAST_ONE_INPUT);

} else {

$dfrom = ”;

$dto = ”;

$pfrom = ”;

$pto = ”;

$keywords = ”;

if (isset($_GET['dfrom'])) {

$dfrom = (($_GET['dfrom'] == DOB_FORMAT_STRING) ? ” : $_GET['dfrom']);

}

if (isset($_GET['dto'])) {

$dto = (($_GET['dto'] == DOB_FORMAT_STRING) ? ” : $_GET['dto']);

}

if (isset($_GET['pfrom'])) {

$pfrom = $_GET['pfrom'];

}

if (isset($_GET['pto'])) {

$pto = $_GET['pto'];

}

if (isset($_GET['keyword']) && $_GET['keyword'] != HEADER_SEARCH_DEFAULT_TEXT && $_GET['keyword'] != KEYWORD_FORMAT_STRING) {

$keywords = $_GET['keyword'];

}

$date_check_error = false;

if (zen_not_null($dfrom)) {

if (!zen_checkdate($dfrom, DOB_FORMAT_STRING, $dfrom_array)) {

$error = true;

$date_check_error = true;

$messageStack->add_session(‘search’, ERROR_INVALID_FROM_DATE);

}

}

if (zen_not_null($dto)) {

if (!zen_checkdate($dto, DOB_FORMAT_STRING, $dto_array)) {

$error = true;

$date_check_error = true;

$messageStack->add_session(‘search’, ERROR_INVALID_TO_DATE);

}

}

if (($date_check_error == false) && zen_not_null($dfrom) && zen_not_null($dto)) {

if (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) {

$error = true;

$messageStack->add_session(‘search’, ERROR_TO_DATE_LESS_THAN_FROM_DATE);

}

}

$price_check_error = false;

if (zen_not_null($pfrom)) {

if (!settype($pfrom, ‘float’)) {

$error = true;

$price_check_error = true;

$messageStack->add_session(‘search’, ERROR_PRICE_FROM_MUST_BE_NUM);

}

}

if (zen_not_null($pto)) {

if (!settype($pto, ‘float’)) {

$error = true;

$price_check_error = true;

$messageStack->add_session(‘search’, ERROR_PRICE_TO_MUST_BE_NUM);

}

}

if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) {

if ($pfrom >= $pto) {

$error = true;

$messageStack->add_session(‘search’, ERROR_PRICE_TO_LESS_THAN_PRICE_FROM);

}

}

if (zen_not_null($keywords)) {

if (!zen_parse_search_string($keywords, $search_keywords)) {

$error = true;

$messageStack->add_session(‘search’, ERROR_INVALID_KEYWORDS);

}

}

}

if (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords)) {

$error = true;

// redundant should be able to remove this

if (!$missing_one_input) {

$messageStack->add_session(‘search’, ERROR_AT_LEAST_ONE_INPUT);

}

}

if ($error == true) {

zen_redirect(zen_href_link(FILENAME_ADVANCED_SEARCH, zen_get_all_get_params(), ‘NONSSL’, true, false));

}

$define_list = array(‘PRODUCT_LIST_MODEL’ => PRODUCT_LIST_MODEL,

‘PRODUCT_LIST_NAME’ => PRODUCT_LIST_NAME,

‘PRODUCT_LIST_MANUFACTURER’ => PRODUCT_LIST_MANUFACTURER,

‘PRODUCT_LIST_PRICE’ => PRODUCT_LIST_PRICE,

‘PRODUCT_LIST_QUANTITY’ => PRODUCT_LIST_QUANTITY,

‘PRODUCT_LIST_WEIGHT’ => PRODUCT_LIST_WEIGHT,

‘PRODUCT_LIST_IMAGE’ => PRODUCT_LIST_IMAGE);

asort($define_list);

$column_list = array();

reset($define_list);

while (list($column, $value) = each($define_list)) {

if ($value) $column_list[] = $column;

}

$select_column_list = ”;

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

if (($column_list[$col] == 'PRODUCT_LIST_NAME') || ($column_list[$col] == 'PRODUCT_LIST_PRICE')) {

continue;

}

if (zen_not_null($select_column_list)) {

$select_column_list .= ', ';

}

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$select_column_list .= 'p.products_model';

break;

case 'PRODUCT_LIST_MANUFACTURER':

$select_column_list .= 'm.manufacturers_name';

break;

case 'PRODUCT_LIST_QUANTITY':

$select_column_list .= 'p.products_quantity';

break;

case 'PRODUCT_LIST_IMAGE':

$select_column_list .= 'p.products_image';

break;

case 'PRODUCT_LIST_WEIGHT':

$select_column_list .= 'p.products_weight';

break;

}

}

// always add quantity regardless of whether or not it is in the listing for add to cart buttons

if (PRODUCT_LIST_QUANTITY < 1) {

if (empty($select_column_list)) {

$select_column_list .= ' p.products_quantity ';

} else {

$select_column_list .= ', p.products_quantity ';

}

}

if (zen_not_null($select_column_list)) {

$select_column_list .= ', ';

}

// Notifier Point

$zco_notifier->notify(‘NOTIFY_SEARCH_COLUMNLIST_STRING’);

// $select_str = “select distinct ” . $select_column_list . ” m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price “;

$select_str = “SELECT DISTINCT ” . $select_column_list .
” p.products_id, pd.products_name, p.products_price, p.product_is_wholesale, p.product_is_always_free_shipping,p.products_quantity_order_min, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status, p.master_categories_id “;

if ((DISPLAY_PRICE_WITH_TAX == ‘true’) && ((isset($_GET['pfrom']) && zen_not_null($_GET['pfrom'])) || (isset($_GET['pto']) && zen_not_null($_GET['pto'])))) {

$select_str .= “, SUM(tr.tax_rate) AS tax_rate “;

}

// Notifier Point

$zco_notifier->notify(‘NOTIFY_SEARCH_SELECT_STRING’);

$from_str = “FROM (” . TABLE_PRODUCTS . ” p,

” . TABLE_PRODUCTS_DESCRIPTION . ” pd, ” . TABLE_CATEGORIES . ” c, ” . TABLE_PRODUCTS_TO_CATEGORIES . ” p2c )

“;

$from_str = $db->bindVars($from_str, ‘:languagesID’, $_SESSION['languages_id'], ‘integer’);

if ((DISPLAY_PRICE_WITH_TAX == ‘true’) && ((isset($_GET['pfrom']) && zen_not_null($_GET['pfrom'])) || (isset($_GET['pto']) && zen_not_null($_GET['pto'])))) {

if (!$_SESSION['customer_country_id']) {

$_SESSION['customer_country_id'] = STORE_COUNTRY;

$_SESSION['customer_zone_id'] = STORE_ZONE;

}

$from_str .= ” LEFT JOIN ” . TABLE_TAX_RATES . ” tr

ON p.products_tax_class_id = tr.tax_class_id

LEFT JOIN ” . TABLE_ZONES_TO_GEO_ZONES . ” gz

ON tr.tax_zone_id = gz.geo_zone_id

AND (gz.zone_country_id IS null OR gz.zone_country_id = 0 OR gz.zone_country_id = :zoneCountryID)

AND (gz.zone_id IS null OR gz.zone_id = 0 OR gz.zone_id = :zoneID)”;

$from_str = $db->bindVars($from_str, ‘:zoneCountryID’, $_SESSION['customer_country_id'], ‘integer’);

$from_str = $db->bindVars($from_str, ‘:zoneID’, $_SESSION['customer_zone_id'], ‘integer’);

}

// Notifier Point

$zco_notifier->notify(‘NOTIFY_SEARCH_FROM_STRING’);

$where_str = ” WHERE (p.products_status = 1

AND p.products_id = pd.products_id

AND pd.language_id = :languagesID

AND p.products_id = p2c.products_id

AND p2c.categories_id = c.categories_id “.$displayOrder.$pricefilter;

$where_str2 = ” WHERE (p.products_status = 1

AND p.products_id = pd.products_id

AND pd.language_id = :languagesID

AND p.products_id = p2c.products_id

AND p2c.categories_id = c.categories_id “.$displayOrder;

$where_str = $db->bindVars($where_str, ‘:languagesID’, $_SESSION['languages_id'], ‘integer’);

$where_str2 = $db->bindVars($where_str2, ‘:languagesID’, $_SESSION['languages_id'], ‘integer’);

// reset previous selection

if (!isset($_GET['inc_subcat'])) {

$_GET['inc_subcat'] = ’0′;

}

if (!isset($_GET['search_in_description'])) {

$_GET['search_in_description'] = ’0′;

}

if (isset($_GET['categories_id']) && zen_not_null($_GET['categories_id'])) {

if ($_GET['inc_subcat'] == ’1′) {

$subcategories_array = array();

zen_get_subcategories($subcategories_array, $_GET['categories_id']);

$where_str .= ” AND p2c.products_id = p.products_id

AND p2c.products_id = pd.products_id

AND (p2c.categories_id = :categoriesID”;

$where_str2 .= ” AND p2c.products_id = p.products_id

AND p2c.products_id = pd.products_id

AND (p2c.categories_id = :categoriesID”;

$where_str = $db->bindVars($where_str, ‘:categoriesID’, $_GET['categories_id'], ‘integer’);

$where_str2 = $db->bindVars($where_str2, ‘:categoriesID’, $_GET['categories_id'], ‘integer’);

for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {

$where_str .= " OR p2c.categories_id = :categoriesID";

$where_str2 .= " OR p2c.categories_id = :categoriesID";

$where_str = $db->bindVars($where_str, ‘:categoriesID’, $subcategories_array[$i], ‘integer’);

$where_str2 = $db->bindVars($where_str2, ‘:categoriesID’, $subcategories_array[$i], ‘integer’);

}

$where_str .= “)”;

$where_str2 .= “)”;

} else {

$where_str .= ” AND p2c.products_id = p.products_id

AND p2c.products_id = pd.products_id

AND pd.language_id = :languagesID

AND p2c.categories_id = :categoriesID”;

$where_str2 .= ” AND p2c.products_id = p.products_id

AND p2c.products_id = pd.products_id

AND pd.language_id = :languagesID

AND p2c.categories_id = :categoriesID”;

$where_str = $db->bindVars($where_str, ‘:categoriesID’, $_GET['categories_id'], ‘integer’);

$where_str2 = $db->bindVars($where_str, ‘:categoriesID’, $_GET['categories_id'], ‘integer’);

$where_str = $db->bindVars($where_str, ‘:languagesID’, $_SESSION['languages_id'], ‘integer’);

$where_str2 = $db->bindVars($where_str, ‘:languagesID’, $_SESSION['languages_id'], ‘integer’);

}

}

if (isset($_GET['manufacturers_id']) && zen_not_null($_GET['manufacturers_id'])) {

$where_str .= ” AND m.manufacturers_id = :manufacturersID”;

$where_str2 .= ” AND m.manufacturers_id = :manufacturersID”;

$where_str = $db->bindVars($where_str, ‘:manufacturersID’, $_GET['manufacturers_id'], ‘integer’);

$where_str2 = $db->bindVars($where_str2, ‘:manufacturersID’, $_GET['manufacturers_id'], ‘integer’);

}

if (isset($keywords) && zen_not_null($keywords)) {

if (zen_parse_search_string(stripslashes($_GET['keyword']), $search_keywords)) {

$where_str .= ” AND (“;

$where_str2 .= ” AND (“;

for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {

switch ($search_keywords[$i]) {

case '(':

case ')':

case 'and':

case 'or':

$where_str .= " " . $search_keywords[$i] . " ";

$where_str2 .= " " . $search_keywords[$i] . " ";

break;

default:

$where_str .= "(pd.products_name like '%:keywords%'

OR p.products_model

LIKE '%:keywords%'

";

$where_str2 .= "(pd.products_name like '%:keywords%'

OR p.products_model

LIKE '%:keywords%'

";

$where_str = $db->bindVars($where_str, ‘:keywords’, $search_keywords[$i], ‘noquotestring’);

$where_str2 = $db->bindVars($where_str2, ‘:keywords’, $search_keywords[$i], ‘noquotestring’);

// search meta tags

$where_str .= ‘)’;

$where_str2 .= ‘)’;

break;

}

}

$where_str .= ” ))”;

$where_str2 .= ” ))”;

}

}

if (!isset($keywords) || $keywords == “”) {

$where_str .= ‘)’;

$where_str2 .= ‘)’;

}

//die(‘I SEE ‘ . $where_str);

$listing_sql = $select_str . $from_str . $where_str . $product_sort;

$listing_sql2 = $select_str . $from_str . $where_str2 . $product_sort;
// Notifier Point

$zco_notifier->notify(‘NOTIFY_SEARCH_ORDERBY_STRING’, $listing_sql);$zco_notifier->notify(‘NOTIFY_SEARCH_ORDERBY_STRING’, $listing_sql2);

$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_ADVANCED_SEARCH));

$breadcrumb->add(NAVBAR_TITLE_2);

$advanced_search_split = new splitPageResults($listing_sql, (isset($_GET['pagesize']) ? $_GET['pagesize'] : MAX_DISPLAY_PRODUCTS_LISTING ), ‘p.products_id’, ‘page’);

//print_r($advanced_search_split);
if ($advanced_search_split->number_of_rows == 0) {

$messageStack->add_session(‘search’, TEXT_NO_PRODUCTS, ‘caution’);

zen_redirect(zen_href_link(FILENAME_ADVANCED_SEARCH, zen_get_all_get_params(‘action’)));

}

$advanced_search = $db->Execute($advanced_search_split->sql_query);

if($advanced_search->RecordCount()>0){

$row = 0;

while (!$advanced_search->EOF) {

if ($advanced_search->fields['products_image'] == ” and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {

$list_box_contents[$row]['products_image'] = ”;

} else {

$list_box_contents[$row]['products_image'] = $advanced_search->fields['products_image'] ;

}

$list_box_contents[$row]['products_name'] = $advanced_search->fields['products_name'];

$list_box_contents[$row]['products_description'] = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($advanced_search->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);

$list_box_contents[$row]['products_price'] = zen_get_products_base_price($advanced_search->fields['products_id']);

$list_box_contents[$row]['actual_price'] = $currencies->display_price(zen_get_products_actual_price($advanced_search->fields['products_id']),zen_get_tax_rate($product_check->fields['products_tax_class_id']));

$list_box_contents[$row]['products_status']=$advanced_search->fields['products_status'];

if ($advanced_search->fields['product_is_always_free_shipping'] == 0) {

$list_box_contents[$row]['product_is_always_free_shipping'] = ”;

} else {

$list_box_contents[$row]['product_is_always_free_shipping'] = ‘‘;

}

$list_box_contents[$row]['products_quantity_order_min'] = $advanced_search->fields['products_quantity_order_min'];

$list_box_contents[$row]['products_id'] = $advanced_search->fields['products_id'];

$list_box_contents[$row]['products_quantity'] = $advanced_search->fields['products_quantity'];

$list_box_contents[$row]['products_price_retail'] = $currencies->display_price($advanced_search->fields['products_price_retail'],zen_get_tax_rate($product_check->fields['products_tax_class_id']));

$list_box_contents[$row]['products_price_sample'] = $currencies->display_price($advanced_search->fields['products_price_sample'],zen_get_tax_rate($product_check->fields['products_tax_class_id']));

$list_box_contents[$row]['product_is_wholesale'] = $advanced_search->fields['product_is_wholesale'];

$list_box_contents[$row]['product_wholesale_min'] = $advanced_search->fields['product_wholesale_min'];

$advanced_search->MoveNext();

$row++;

}

}

$advanced_search_split2 = new splitPageResults($listing_sql2, (isset($_GET['pagesize']) ? $_GET['pagesize'] : MAX_DISPLAY_PRODUCTS_LISTING ), ‘p.products_id’, ‘page’);

$advanced_search2 = $db->Execute($advanced_search_split2->sql_query);

if($advanced_search2->RecordCount()>0){

$row = 0;

while (!$advanced_search2->EOF) {

if ($advanced_search2->fields['products_image'] == ” and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {

$list_box_contents2[$row]['products_image'] = ”;

} else {

$list_box_contents2[$row]['products_image'] = $advanced_search2->fields['products_image'] ;

}

$list_box_contents2[$row]['products_name'] = $advanced_search2->fields['products_name'];

$list_box_contents2[$row]['products_description'] = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($advanced_search2->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);

$list_box_contents2[$row]['products_price'] = zen_get_products_base_price($advanced_search2->fields['products_id']);

$list_box_contents2[$row]['actual_price'] = $currencies->display_price(zen_get_products_actual_price($advanced_search2->fields['products_id']),zen_get_tax_rate($product_check->fields['products_tax_class_id']));

$list_box_contents2[$row]['products_status']=$advanced_search2->fields['products_status'];

if ($advanced_search2->fields['product_is_always_free_shipping'] == 0) {

$list_box_contents2[$row]['product_is_always_free_shipping'] = ”;

} else {

$list_box_contents2[$row]['product_is_always_free_shipping'] = ‘‘;

}

$list_box_contents2[$row]['products_quantity_order_min'] = $advanced_search2->fields['products_quantity_order_min'];

$list_box_contents2[$row]['products_id'] = $advanced_search2->fields['products_id'];

$list_box_contents2[$row]['products_quantity'] = $advanced_search2->fields['products_quantity'];

$list_box_contents2[$row]['products_price_retail'] = $currencies->display_price($advanced_search2->fields['products_price_retail'],zen_get_tax_rate($product_check->fields['products_tax_class_id']));

$list_box_contents2[$row]['products_price_sample'] = $currencies->display_price($advanced_search2->fields['products_price_sample'],zen_get_tax_rate($product_check->fields['products_tax_class_id']));

$list_box_contents2[$row]['product_is_wholesale'] = $advanced_search2->fields['product_is_wholesale'];

$list_box_contents2[$row]['product_wholesale_min'] = $advanced_search2->fields['product_wholesale_min'];

$advanced_search2->MoveNext();

$row++;

}

}

// This should be last line of the script:

$zco_notifier->notify(‘NOTIFY_HEADER_END_ADVANCED_SEARCH_RESULTS’, $keywords);

//EOF

Popularity: 30% [?]

lightinthebox关于如何使用批量上传文件的教程

April 23, 2010 by gbliang · 1,136 Comments
Filed under: zen cart 

这里以中文版为参照,文件为全属性文件
先说下载的文档里各个参数
v_products_model 产品的型号 必须,建议唯一
v_products_image 产品图片
v_products_name_1 产品名称
v_products_description_1 产品描述
v_products_url_1 产品url
v_specials_price 产品特价
v_specials_date_avail 特价开始时间
v_specials_expires_date 特价截至时间
v_products_price 产品价格
v_products_weight 产品重量
v_date_avail 产品生效时间
v_date_added 产品添加时间
v_products_quantity 数量
v_manufacturers_name 厂商名称
v_categories_name_1 一级目录
v_categories_name_2 二级目录
v_categories_name_3
v_categories_name_4
v_categories_name_5
v_categories_name_6
v_categories_name_7
v_tax_class_title 税终名称 默认为”无” 英文默认为”–none–”
v_status 产品状态 默认1为产品开 0为关 9为删除产品
EOREOR 错误 默认为EOREOR
以下是注意事项和使用技巧
1.产品的型号必须填写
2.产品的图片,有些国外的服务器对于文件的后缀名大小写有严格的要求,建议图片扩展要么都是大写要么都是小写,图片名字就是产品型号,这样也好管理,这样,比如在A2在输入产品编号的时候 可以在excel可以输入=SUBSTITUTE(SUBSTITUTE(B2,”.JPG”,,1),”.jpg”,,1)就可以直接调用图片的名字了
3.关于输入时间格式的问题,这个问题很是重要,因为在excel中默认的时间是显示不了象2007-06-26 13:28:00这样的,要设置单元格格式,选中这一列,点击右键,设置单元格格式 分类里面选择自定义,然后在类型框输入yyyy-mm-dd hh:mm:ss 这样时间格式就对了

geshi.jpg
geshi.jpg (25.96 KiB) 被浏览 13970 次

还有人问如何设置产品的顺序,可以把v_date_added设置不同时间,后台产品列表设置为默认的排列顺序,即时间排序
4.关于用excel进行自动完成功能要一定注意有数字的时候,比如发分类中,925纯银,拖下来就会成为 926纯银,927纯银…..已经时间列也是如此,可以在自动完成的时候 填充方式为复制单元格

zidong.jpg
zidong.jpg (18.46 KiB) 被浏览 13892 次

5.关于怎么保存文件,下载下来模板的时候用excel打开,另存为一份excel文件,即xls文件,用excel文件进行编辑,编辑好之后在excel中文件—另存为 —-保存类型选择为 “文本文件(制表符分割)(*.txt)”格式,要用这个txt文件来上传

geshi.jpg
geshi.jpg (25.96 KiB) 被浏览 13970 次

6.utf-8版本的zencart使用这个模块的时候,要把最后的txt文件也要转化编码为utf-8,简单的方法就是用dreamwaver打开txt文件,在修改—页面属性—编码,设置为utf-8

save.jpg
save.jpg (7.92 KiB) 被浏览 13820 次

结合IH2模块,只要把图片用ftp上传到images文件夹,再上传批量文件,一天上传几千个产品是没有问题的,对于新站铺货那不是一般的方便

有什么问题,大家下面回帖问啊 :P 另外,一定注意,安全起见,备份数据库

—————————–更新了内容的分割线——————————————————–
更新属性批量管理方法
先看下属性里面的第一行
v_products_model v_attribute_options_id_1 v_attribute_options_name_1_1 v_attribute_options_name_1_2 v_attribute_values_id_1_1 v_attribute_values_price_1_1 v_attribute_values_name_1_1_1 v_attribute_values_name_1_1_2 v_attribute_values_id_1_2 v_attribute_values_price_1_2 v_attribute_values_name_1_2_1 v_attribute_values_name_1_2_2
下面解释下作用及用法
v_products_model 商品型号
v_attribute_options_id_1 选项名称id,也就是你后台添加一个选项名称的时候数据库会生成一个id,如新增选项名称则此id需唯一
v_attribute_options_name_1_2和v_attribute_options_name_1_1 即选项名称的各语言名称的值,此格式为v_attribute_options_name_1_语言id
v_attribute_values_id_1_1 选项内容id 即后台添加属选项内容的时候的时候的一个id,如新增则需要唯一,此格式为v_attribute_values_id_1_序列数
v_attribute_values_price_1_1 该产品的该选项内容的价格变动 ,为0则价格不变,此格式为v_attribute_values_price_1_选项内容id序列数
v_attribute_values_name_1_1_1 选项内容的各语言值, 此格式为 v_attribute_values_name_1_选项内容id序列数_语言id
下面举例来说
新增一个产品的两条属性
v_products_model v_attribute_options_id_1 v_attribute_options_name_1_1 v_attribute_options_name_1_2 v_attribute_values_id_1_1 v_attribute_values_price_1_1 v_attribute_values_name_1_1_1 v_attribute_values_name_1_1_2 v_attribute_values_id_1_2 v_attribute_values_price_1_2 v_attribute_values_name_1_2_1 v_attribute_values_name_1_2_2
aaaaa 1000 颜色 color 1001 0 红色 red 1002 1 蓝色 blue
添加一个产品model为aaaaa,此产品已存在,1000为选项名称id,颜色和color为两个语言的值,1001和1002为选项内容的id,红色和蓝色为选项内容的两种语言的值,红色的属性价格不变,而蓝色的属性价格加了一个货币单位
以此类推 想增加更多的只要往后面按格式增加列就可以了
想多个产品只要增加行就可以了

Popularity: 32% [?]

仿Lightinthebox模版快速修改中文教程

April 22, 2010 by gbliang · 73 Comments
Filed under: zen cart 

前段时间市面上很火的”lightinthebox模版”–简称light模版。该模版具有很漂亮的外观界面,而且功能也是异常强大的,几乎含盖了zen cart网站程序的所有功能。可以说把zencart站的SEO发挥到了极智。如何将lightinthebox模版再次开发?这应该是很多zen cart人的梦想。但是理想是远大的,现实是残酷的,如何才能得到一套几乎无Bug的lightinthebox模版呢?而现在市面上很多个 lightinthebox模版价格很低,有卖几百的,也有卖几千的?差别在哪,无非就是BUG的多少,以及插件的多少了。

下面主要介绍下Lighinthebox模版的修改方式。

一. 如何修改lightinthebox模版的LOGO

操作: 右键点击网站LOGO查看路径,不难看出替换 includes/templates/lightinthebox/images/logo.jpg 图片就可以搞定。

二. 如何修改lightinthebox模版的网站小图标?

操作: 替换网站程序中的根目录下的 favicon.ico 文件,这个文件格式,可以去百度或者GOOGLE下,用免费的软件就可以做出来。

三. 如何修改lightinthebox模版的首页flash广告图片?

操作:网站程序根目录下 /flash/promotion2.xml 这个里面,替换图片名称,以及连接图片的地址,就可以了!

四. 如何修改lightinthebox模版首页的Featured Categories

操作: lightinthebox模版的后台分类里,添加分类时可以选择 Featured Categories 就可以展示到首页的这个栏目。

五. 如何修改lightinthebox模版首页的Best Deals

操作: best deals 的产品图片就是后台的分类管理里的 Specials

六. 如何修改lightinthebox模版首页的Free Shipping

操作:在上传产品的时候,可以选择free shipping 这个拦目,选择后保存,就显示在首页的free shipping

七. 如何修改lightinthebox模版首页的Shopping by Categories

操作: 上传产品分类,可以选择Shopping by Categories这个项目。然后商品分类的图片就展示出来了

八. 如何编辑lightinthebox模版的Why buy wholesale goods from us?内容

操作:此处并不需要去修改代码,直接在后台tools—define pages editor—main page 编辑保存就OK了。

九. 如何修改lightinthebox模版下面的Partners?

操作: 网站后台 Extras—links 编辑就可以了。

十. 如何修改lightinthebox模版最下面的导航拦目的内容?

操作: 网站后台 tools—define pages editor 修改对应的contact us about us 等等就可以了。

Popularity: 4% [?]

zen-cart,zen cart 模板,外贸网店,仿lightinthebox.

March 24, 2010 by gbliang · 1,249 Comments
Filed under: zen cart 
  • 点击这里进入购买   如果出错,请直接进入http://51pass.taobao.com

  • 1.程序200元,只包安装,安装好的程序与lightbox.chinaitunion.com的演示站基本一样的,不负责网站的设置,图片及文字的修改,可以提供一些文档指导网站的使用。

  • 2.由于主机不同,有些windows 主机 没有支持appache, 安装不正常,不是程序的问题,建议用linux 主机 ,并确定 有相关程序支持 zencart以及模板的相关插件。

    3.这是一个带有ZEN CART 1.38a 的网站程序,后台是英文的,有需要的话,可以改为中文的(90%汉化)

    4、我已经测试过可以正常试用,请购买之前仔细浏览我的演示站,看看是否适合自己使用,如果不适用请不要购买,购买后不得以网站不好看,或者没有别人的网站的什么功能,还有自已安装不成功的等理由退款

  • 后台功能齐全,无BUG,包安装,可提供指导.

旺旺不常在线,看演示或购买的请联系QQ:27808573 ,可提供后台的密码演示.

http://lightbox.chinaitunion.com  copy这网址到浏览器后按回车键就可以进入了

英文购物网站,zencart模板,B2C网站,大型B2C外贸网站店制作,功能强大齐全的英文购物站。

网站特色功能:

1.Paypal,Moneybooker,West Union等国际流行支付方式;
2.支持多种语言、货币和税率结构;
3.多种配送方式。
4.完善的购物流程。
5.PHP+MYSQL,稳定性安全性更高,DIV+CSS网站结构符合web标准;
6.内置SEO模块,让你网站的每个页面,每个产品都轻易被搜索引擎收录。
7.内置邮件发送模块。
8.内置网上实时运费报价,根据不同地区的客户自动计算运费。
9.整站生成静态html页面,提升网站整体质量。

Popularity: 35% [?]