经历两天的折腾,终于把News box manager这个古老的插件升级到151可用的,
升级内容如下:
1:可以直接运行SQL,后台直接显示设置和创建News,不用像13那版本要手工建
2:前端的侧栏新闻标题可以滚动显示,原始的功能是不能连续滚动
3:可以在后台控制滚动方式,比如滚动快慢,间歇滚动,连续滚动
4:后台可以控制侧栏滚动方式显示还是静态列表方式
现在的时间是 2024-04-25 17:23
if (!isset($first_element)) {
$first_element = $categories->fields['categories_id'];
}
$categories->MoveNext();
if (zen_has_category_subcategories($categories->fields['categories_id'])) {
$cPath_array[] = $categories->fields['categories_id'];
}
if (!isset($first_element)) {
$first_element = $categories->fields['categories_id'];
}
-----------------------------------新添加内容开始---------------------------------
if (zen_has_category_subcategories($categories->fields['categories_id'])) {
$cPath_array[] = $categories->fields['categories_id'];
}
-----------------------------------新添加内容结束---------------------------------
$categories->MoveNext();
$this->box_categories_array[$ii]['name'] = $this->tree[$counter]['name'];
1, 创建一个新文件 随意命名 没重复就行 例如:tpl_product_info_similar.php
复制该文件到includes\templates\你的模板\templates\目录下: (见附件)
2,找到includes\templates\你的模板\templates\tpl_product_info_display.php文件
在相应的位置加上以下代码:
get_template_dir('你创建的文件tpl_product_info_similar.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/你创建的文件tpl_product_info_similar.php'); ?>
一般可以加到get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>的上面或下面
其中:
NO1:
if($mn%4 == 0){
echo "";$mn=0;
}
//print_r($flash_page_items);
}
if($mn<4){
$cols = 4-$mn;
数字4是表示每行显示4个,可以该为你需要的比如3个
NO2:
ORDER BY rand() limit 8";
数字8是表示总共显示8个,可以该为你需要的比如9个
<th scope="col" id="myAccountQuantity"><?php echo HEADING_QUANTITY; ?></th>
<th scope="col" id="myAccountQuantity"><?php echo HEADING_PRODUCTS_IMAGE; ?></th>
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$img_temp_arr=array();
$img_temp_arr=explode(',',uuant_get_products_image($order->products[$i]['id']));
<td class="accountQuantityDisplay"><?php echo $order->products[$i]['qty'] . QUANTITY_SUFFIX; ?></td>
<td class="accountQuantityDisplay"><?php echo uuant_info_image($img_temp_arr[0], $order->products[$i]['name'], 50, 50); ?></td>
'<a href="'.zen_href_link(FILENAME_PRODUCT_INFO,'products_id='.$order->products[$i]['id']).'">'.$order->products[$i]['name'].'</a>';
<td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
<td class="dataTableHeadingContent" ><?php echo TABLE_HEADING_PRODUCTS_IMAGE; ?></td>
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$img_temp_arr=array();
$img_temp_arr=explode(',',zen_get_products_image($order->products[$i]['id']));
echo ' <tr class="dataTableRow">' . "\n" .
' <td class="dataTableContent" valign="top">' .zen_info_image($img_temp_arr[0], $order->products[$i]['name'], 30, 30) . '</td>' . "\n" .
// load the before_process function from the payment modules
$payment_modules->before_process();
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_BEFOREPROCESS');
$payment_modules->after_order_create($insert_id);
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_PAYMENT_MODULES_AFTER_ORDER_CREATE');
if (isset($$_SESSION['payment']->form_action_url)) {
$form_action_url = $$_SESSION['payment']->form_action_url;
////以下为新增
if (!isset($_SESSION['order_number_created'])){
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'));
}
if (!($_GET['referer'] == 'paypal')) {
// create the order record
$insert_id = $order->create($order_totals, 2);
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE');
// store the product info to the order
$order->create_add_products($insert_id);
$_SESSION['order_number_created'] = $insert_id;
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_ORDER_CREATE_ADD_PRODUCTS');
//send email notifications
$order->send_order_email($insert_id, 2);
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_SEND_ORDER_EMAIL');
}
帖子总数:111768 • 主题总数:69295 • 注册用户总数:23542