Jump to content

irder

Members
  • Posts

    341
  • Joined

  • Last visited

Everything posted by irder

  1. hello,please test this,thanks https://github.com/PrestaShop/PrestaShop/pull/7876 public function addColorsToProductList(&$products) { if (!is_array($products) || !count($products) || !file_exists(_PS_THEME_DIR_.'product-list-colors.tpl')) { return; } $products_need_cache = array(); foreach ($products as &$product) { if (!$this->isCached(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product']))) { $products_need_cache[] = (int)$product['id_product']; }else{ $product['color_list'] = $this->context->smarty->createTemplate(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product']))->fetch(); } } unset($product); $colors = false; if (count($products_need_cache)) { var_dump($products_need_cache); $colors = Product::getAttributesColorList($products_need_cache); Tools::enableCache(); foreach ($products as &$product) { if (in_array($product['id_product'], $products_need_cache)){ $tpl = $this->context->smarty->createTemplate(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product'])); if (isset($colors[$product['id_product']])) { $tpl->assign(array( 'id_product' => $product['id_product'], 'colors_list' => $colors[$product['id_product']], 'link' => Context::getContext()->link, 'img_col_dir' => _THEME_COL_DIR_, 'col_img_dir' => _PS_COL_IMG_DIR_ )); $product['color_list'] = $tpl->fetch(_PS_THEME_DIR_.'product-list-colors.tpl', $this->getColorsListCacheId($product['id_product'])); } else { $product['color_list'] = ''; } } } Tools::restoreCacheSettings(); } } this code can fix the bug ,but i don't know why
  2. i upgrade my server to php 7.0.18 and mysql 5.7 it's much faster than before,it's will take about 1700ms to load the product page, now only 500ms
  3. hi, in category.tpl add the code like {if $category->id eq xxx1 } {assign var='view' value='list'} {elseif $category->id eq xxx2 } {assign var='view' value='grid'} {elseif} {assign var='view' value='grid'} {if} then in product-list.tpl <div {if isset($id) && $id} id="{$id}"{/if} class="display-items product_list product-list grid row{if isset($class) && $class} {$class}{/if} calc-items"> remove the default view "grid" add the variable view the code will be like <div {if isset($id) && $id} id="{$id}"{/if} class="display-items product_list product-list row {if isset($view) && $view} {$view}{/if} {if isset($class) && $class} {$class}{/if} calc-items">
  4. you should set shop url for shop 2
  5. if you have a server or VPS ,you have it skills maybe live helper chat is a good option
  6. i think you can modify the product-list.tpl <div {if isset($id) && $id} id="{$id}"{/if} class="display-items product_list product-list grid row{if isset($class) && $class} {$class}{/if} calc-items"> {foreach from=$products item=product name=products} you can set the grid view or list view for different category id
  7. yes,very old topic,i have not noticed it,there are difference with the one shipped with Prestashop 1.6. versions,
  8. hello,i have a module like this, http://www.dealsel.com/en/prestashop-modules/950-prestashop-weight-range-based-shipping-cost.html
  9. hello, i mean these rewrite rules for product ,category,supplier,and so on
  10. 是的 已经开发了一个1.6.x 版本的,测试中
  11. line 302 pb-center-column #short_description_block { margin-top: 10px; margin-bottom: 20px; display: none;} remove display:none
  12. hello,please check product_list.css line 452 .right-block { .product-desc, .color-list-container, .product-flags, .availability, .functional-buttons, .button-list { display: none; } it's hidden
  13. hello,it seems the js file fb_login.js have not been loaded,please check, this module is also need to hook in header,so the js will be loaded
  14. 我开发了1.6.x版本的,类似于aliexpress的运费计算 包括后台也是根据重量范围和计价单位来计算运费的,比较科学 (抱歉是收费的,点此处购买)
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More