购物车付款等页面不显示左边栏: if(!($current_page=='shopping_cart')){ if(!($current_page=='login')){if(!($current_page=='checkout_shipping')){ if(!($current_page=='checkout_payment')){ if(!($current_page=='checkout_confirmation')){ if(!($current_page=='create_account')){?>
产品页不显示 :
首页不显示 左边栏 :
产品页不显示banner:
$content .= '
$content .= '';
update `products_description` set `language_id` = replace(`language_id`,1,6)
“自己的邮箱” “商店名称” STORE_NAME
“创建帐号” 改为 “商品分类” 改为 “登出” 改为
“我的帐号” 改为 “登录” 改为
“购物车中的货品” 改为 “结帐” 改为 “搜索”改为
“高级搜索”改为 “特价商品” 改为 “新进商品” 改为
href=\"echo
zen_href_link(FILENAME_CONTACT_US);
?>\"
rel=\"nofollow\">
href=\"echo
zen_href_link(FILENAME_SHIPPING);
?>\"
rel=\"nofollow\">
href=\"echo
zen_href_link(FILENAME_PRIVACY);
?>\"
rel=\"nofollow\">
“推荐商品” 改为 “所有商品” 改为 “联系我们” 改为 “货币” 改为 “语言” 改为
登陆框
忘记密码:' . TEXT_PASSWORD_FORGOTTEN . ''; ?>
用户登陆、注册、账户、退出
href=\"echo echo zen_href_link(FILENAME_LOGOFF, zen_href_link(FILENAME_ACCOUNT, '', '', 'SSL'); 'SSL'); ?>\">\">echo echo HEADER_TITLE_LOGOFF; ?> zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>\">echo HEADER_TITLE_LOGIN; ?>
>
购物车信息
货币选择: if (isset($currencies) && is_object($currencies)) { reset($currencies->currencies); $currencies_array = array();
while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); }
$hidden_get_variables = ''; reset($_GET);
while (list($key, $value) = each($_GET)) {
if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) { $hidden_get_variables .= zen_draw_hidden_field($key, $value); } } }
$content = zen_draw_form('currencies', zen_href_link(basename(ereg_replace('.php','', $PHP_SELF)), '', $request_type, false), 'get');
$content .= 'Currencies :' . zen_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], 'onchange=\"this.form.submit();\"') . $hidden_get_variables . zen_hide_session_id(); $content .= ''; echo $content; ?>
读取导航分类信息
$categories_tab_query = \"select a.categories_id,b.categories_name from \" . TABLE_CATEGORIES . \" a, \" . TABLE_CATEGORIES_DESCRIPTION . \" b where a.categories_id=b.categories_id and a.parent_id= '0' and b.language_id='\" . (int)$_SESSION['languages_id'] . \"' and a.categories_status='1'\" . $order_by;
$categories_tab = $db->Execute($categories_tab_query); while(!$categories_tab->EOF) { $content1
.=
'
.
zen_href_link(FILENAME_DEFAULT,
'cPath='
.
(int)$categories_tab->fields['categories_id']) . '\">'.$categories_tab->fields['categories_name'].'
$pid = $categories_tab->fields['categories_id'];
$sql = \"select a.categories_id,b.categories_name from \" . TABLE_CATEGORIES . \" a, \" .
TABLE_CATEGORIES_DESCRIPTION . \" b where a.categories_id=b.categories_id and a.parent_id= '\".(int)$categories_tab->fields['categories_id'].\"' and b.language_id='\" . (int)$_SESSION['languages_id'] . \"' and a.categories_status='1'\" .$order_by; $categories_main = $db->Execute($sql); while(!$categories_main->EOF) {
$content1
.=
'
.
zen_href_link(FILENAME_DEFAULT,
'cPath='
(int)$categories_tab->fields['categories_id'].'_'.$categories_main->fields['categories_id']) '\">'.$categories_main->fields['categories_name'].'
}
$content1 .='
echo $content1; ?>
分类下产品的显示方式 $cell_scope = (!isset($cell_scope) || empty($cell_scope)) ? 'col' : $cell_scope;
$cell_title = (!isset($cell_title) || empty($cell_title)) ? 'list' : $cell_title; ?> for($row=1; $row $c_params = \"\"; if (isset($list_box_contents[$row]['params'])) $r_params .= ' ' . $list_box_contents[$row]['params']; . . ?> if (isset($list_box_contents[$row][$col]['text'])) { ?> echo ' 读取分类下的产品 //sql $pic_switching_sql = \"select p.products_id,p.products_image,pd.products_name from \" . TABLE_PRODUCTS .\" p, \". TABLE_PRODUCTS_DESCRIPTION . \" pd where p.`products_id`=pd.`products_id` AND pd.`language_id` = '\" . (int)$_SESSION['languages_id'] . \"' ORDER BY rand() limit 15\"; //执行sql $pic_switching = $db->Execute($pic_switching_sql); //循环产品 while (!$pic_switching->EOF) { //产品链接,产品图片,产品名 $pic_switching->MoveNext(); } ?> 读取新闻 = $db->Execute(\"select distinct n.article_id, nt.news_article_name, nt.news_article_text, from \" . nt.news_article_shorttext, n.news_image, nt.news_image_text, n.news_date_published >'. zen_image(DIR_WS_IMAGES . TABLE_NEWS_ARTICLES . \" n left join \" . TABLE_NEWS_ARTICLES_TEXT . \" nt on n.article_id = nt.article_id and nt.language_id = '\" . (int)$_SESSION['languages_id'] . \"' where n.news_status = '1' order by rand() limit 12\"); //循环 while (!$article->EOF) { echo ' //移动到下一条 } ?> 读取详细新闻(包含内容) } $article->MoveNext(); if($this_is_home_page){ $article = $db->Execute(\"select distinct n.article_id, nt.news_article_name, nt.news_article_text, from \" . nt.news_article_shorttext, n.news_image, nt.news_image_text, n.news_date_published TABLE_NEWS_ARTICLES . \" n left join \" . TABLE_NEWS_ARTICLES_TEXT . \" nt on n.article_id = nt.article_id and nt.language_id = '\" . (int)$_SESSION['languages_id'] . \"' where n.news_status = '1' order by rand() limit 5\"); while (!$article->EOF) { echo ' 'article_id=' . $article->fields['article_id']).'\" title=\"'.stripslashes($article->fields['news_article_name']).'\">'.stripslashes($article->fields['news_article_name']).' echo ' $article->MoveNext(); } ?> 分类与子分类的读取 $content = \"\"; $content .= ' $order_by = \" order by a.sort_order, b.categories_name \"; $categories_tab_query = \"select a.categories_id,b.categories_name from \" . TABLE_CATEGORIES . \" a, \" . TABLE_CATEGORIES_DESCRIPTION . \" b where a.categories_id=b.categories_id and a.parent_id= '0' and b.language_id='\" . (int)$_SESSION['languages_id'] . \"' and a.categories_status='1'\" . $order_by; //执行主分类sql $categories_tab = $db->Execute($categories_tab_query); //循环 while(!$categories_tab->EOF) { //显示主分类 $content .= ' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '\">'.$categories_tab->fields['categories_name'].' $pid = $categories_tab->fields['categories_id']; } //子分类sql $sql = \"select a.categories_id,b.categories_name from \" . TABLE_CATEGORIES . \" a, \" . TABLE_CATEGORIES_DESCRIPTION . \" b where a.categories_id=b.categories_id and a.parent_id= '\".(int)$categories_tab->fields['categories_id'].\"' and b.language_id='\" . (int)$_SESSION['languages_id'] . \"' and a.categories_status='1'\" .$order_by.\"\"; //执行子分类sql $categories_main = $db->Execute($sql); //循环 while(!$categories_main->EOF) { //显示子分类 $content .= ' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . . (int)$categories_tab->fields['categories_id'].'_'.$categories_main->fields['categories_id']) '\">'.$categories_main->fields['categories_name'].' //移动到下一条 $categories_main->MoveNext(); } //移动到下一条 $categories_tab->MoveNext(); } $content .= ' style=\"z-index:100;position:absolute\"> style=\"display:inline\"> limit 6\"; $best_sellers = $db->Execute($best_sellers_query); while (!$best_sellers->EOF) { $contentbest .= 'fields['products_id']), 'products_id='.$best_sellers->fields['products_id']) . '\">' . $best_sellers->fields['products_name'] . ' $best_sellers->MoveNext(); } echo $contentbest; ?> 查错排错: sideboxes里的模块随意插入到网页任意位置方法 参考search_header.php的做法: 把 require($template->get_template_dir($column_box_default, $current_page_base,'common') . '/' . $column_box_default); 改为 require($template->get_template_dir ('tpl_box_你自定义的文件名.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_box_你自定义的文件名.php'); 在common目录下建立此文件名:tpl_box_你自定义的文件名.php 内容: 插入模块时参考写法: 流量统计 src=\"http://s21.cnzz.com/stat.php?id=3068210&web_id=3068210&show=pic1\" language=\"JavaScript\"> DIR_WS_TEMPLATE, zen_href_link(FILENAME_SHIPPING); zen_href_link(FILENAME_REVIEWS); zen_href_link(FILENAME_CONTACT_US); . '\" rel=\"nofollow\">' ?>\" ?>\" ?>\" . rel=\"nofollow\">Shipping & Returns rel=\"nofollow\"> input:focus, select:focus, textarea:focus { } outline: none; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal; color: #010101; border: solid 1px #CCC; padding: 2px; background: #fdfdfd; zen_href_link(FILENAME_SITE_MAP) BOX_INFORMATION_SITE_MAP . ' require(DIR_FS_CATALOG . \"includes/languages/english/html_includes/template/define_page_4.php\"); ?> May we also suggest: 图片路径 src=\"echo $template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images') ?>/bg_footer_global.gif\" alt=\"\" /> 订阅 Newsletter: name=\"subscribe\" action=\"http://www.truereligionjeansoutlet.com/index.php?main_page=subscribe\" method=\"post\"> 无需任何插件,通过Wordpress自带的函数就可以调用文章,下面介绍两种方法,一种是调用最新的文章;另一种是随机调用Blog文章。 首先,把WordPress安装到zen-cart一个子目录里,设置好固定连接等 一、调用最新文章 在合适的地方加入下面两行代码,一般会放在产品页面(/includes/templates/你使用的模板文件名/templates /tpl_product_info_display.php 这行调用WordPress自带函数,目录地址要随着WordPress安装目录变化而变化.如果你的Zen-cart不是根目录,那么前面就要打两个. ['../wordpress所在目录/wp-blog-header.php'] 这里的10指调用的最新文章数量 二、随机调用Blog文章 随机调用5篇Blog文章 $rand_posts = get_posts(‘numberposts=5&orderby=rand’); foreach( $rand_posts as $post ) :? > 判断是否仅在首页显示: „„ .current { background: none repeat scroll 0 0 #343434; color: #FFFFFF; display: inline-block; padding: 3px 8px; } .navSplitPagesLinks a { background: none repeat scroll 0 0 #E9E9E9; color: #3E3E3E; display: inline-block; margin-bottom: 5px; padding: 3px 8px; text-decoration: none; } class=\"corner\"> ' . BOX_INFORMATION_SITE_MAP . '' ?> 因篇幅问题不能全部显示,请点此查看更多更全内容
'; } } ?>href=\"'.zen_href_link(FILENAME_NEWS_ARTICLE,
';' . \"\\n\"; //主分类sql
' . \"\\n\";