Jump to content

Abdillokra

Members
  • Content count

    15
  • Joined

  • Last visited

About Abdillokra

  • Rank
    PrestaShop Newbie
  1. Could find the solution to the exception despite going back to a previous back-up and doing the same modifications. Anyway, now the product page displays as normal. Thus the importance to keep daily back-up!!!!!
  2. Hello Guys, I have the folowing exception and I can't find anywhere in the forum the fix for it. It pops up when I try to open the products page in the Back office (I can't access the products page only). Can please any one point to the solution? [PrestaShopException] Data value must be an traversable array at line 150 in file classes/tree/Tree.php 145. } 146. 147. public function setDataSearch($value) 148. { 149. if (!is_array($value) && !$value instanceof Traversable) { 150. throw new PrestaShopException('Data value must be an traversable array'); 151. } 152. 153. $this->_data_search = $value; 154. return $this; 155. } TreeCore->setDataSearch - [line 125 - classes/helper/HelperTreeCategories.php] - [1 Arguments]120. if (!empty($children)) { 121. $tree[$root_category]['children'] = $children; 122. } 123. 124. $this->setData($tree); 125. $this->setDataSearch(Category::getAllCategoriesName($root_category, $lang, false, null, $this->useShopRestriction())); 126. } 127. } 128. 129. return $this->_data; 130. } HelperTreeCategoriesCore->getData - [line 311 - classes/helper/HelperTreeCategories.php]306. } 307. 308. public function render($data = null) 309. { 310. if (!isset($data)) { 311. $data = $this->getData(); 312. } 313. 314. if (isset($this->_disabled_categories) 315. && !empty($this->_disabled_categories)) { 316. $this->_disableCategories($data, $this->getDisabledCategories()); HelperTreeCategoriesCore->render - [line 2506 - controllers/admin/AdminProductsController.php]2501. $tree->setAttribute('is_category_filter', (bool)$this->id_current_category) 2502. ->setAttribute('base_url', preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token) 2503. ->setInputName('id-category') 2504. ->setRootCategory(Category::getRootCategory()->id) 2505. ->setSelectedCategories(array((int)$id_category)); 2506. $this->tpl_list_vars['category_tree'] = $tree->render(); 2507. 2508. // used to build the new url when changing category 2509. $this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token; 2510. } 2511. // @todo module free AdminProductsControllerCore->initContent - [line 189 - classes/controller/Controller.php]184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 185. $this->initHeader(); 186. } 187. 188. if ($this->viewAccess()) { 189. $this->initContent(); 190. } else { 191. $this->errors[] = Tools::displayError('Access denied.'); 192. } 193. 194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) { ControllerCore->run - [line 367 - classes/Dispatcher.php]362. if (isset($params_hook_action_dispatcher)) { 363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher); 364. } 365. 366. // Running controller 367. $controller->run(); 368. } catch (PrestaShopException $e) { 369. $e->displayMessage(); 370. } 371. } 372. DispatcherCore->dispatch - [line 58 - admin345/index.php]53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 55. } 56. 57. // Prepare and trigger admin dispatcher 58. Dispatcher::getInstance()->dispatch();
  3. Hi guys, I just found how to ad a link to the Categories Block in the footer this way : 1. Go to the blockcategories_footer.tpl file in yout them's folder: /themes/<your theme>/modules/blockcategories/blockcategories_footer.tpl 2. Look for this line : {if $smarty.foreach.blockCategTree.index <= 4} The current number 4 above displays 5 links on the categories block of the footer. 3. To add a 6th link change the 4 value to 5 like this : {if $smarty.foreach.blockCategTree.index <= 5} To display only 3 links, make it 3: {if $smarty.foreach.blockCategTree.index <= 2}
  4. Hello Guys, I'm trying to sort alphabetically the categories labels from my menu. I've looked into the .php file and found this function : public function getblockCategTree() { // Get all groups for this customer and concatenate them as a string: "1,2,3..." $groups = implode(', ', Customer::getGroupsStatic((int) $this->context->customer->id)); $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH'); if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite FROM `' . _DB_PREFIX_ . 'category` c INNER JOIN `' . _DB_PREFIX_ . 'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = ' . (int) $this->context->language->id . Shop::addSqlRestrictionOnLang('cl') . ') INNER JOIN `' . _DB_PREFIX_ . 'category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = ' . (int) $this->context->shop->id . ') WHERE (c.`active` = 1 OR c.`id_category` = ' . (int) Configuration::get('PS_HOME_CATEGORY') . ') AND c.`id_category` != ' . (int) Configuration::get('PS_ROOT_CATEGORY') . ' ' . ((int) $maxdepth != 0 ? ' AND `level_depth` <= ' . (int) $maxdepth : '') . ' AND c.id_category IN (SELECT id_category FROM `' . _DB_PREFIX_ . 'category_group` WHERE `id_group` IN (' . pSQL($groups) . ')) ORDER BY `level_depth` ASC, ' . (Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'cs.`position`') . ' ' . (Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))) return; $resultParents = array(); $resultIds = array(); I tried to edit the Order by from this : ORDER BY `level_depth` ASC, ' . (Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'cs.`position`') . ' ' . (Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))) into this : ORDER BY cl.`name` ASC, ' . (Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'cs.`position`') . ' ' . (Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))) But with no effect on the the labels' order. Can anyone please point the correct method to sort it alphabetically? Many thanks for your help.
  5. Add Menu Top Link For Dutch Website

    Hi I found a solution. Don't need to change the default language. It it is in english you can keep it in english. 1. Create the new link in english (your default language) : Back Office>Modules & Services> Top Horizontal Menu> "Add Menu Top Link" section Add Your Label ("Home"), on the label field. Add your Hompage link (previously copied in the adress bar when visiting it) in the link field. (Select New Window if you want the new link to open in a new window) Click the Add button. 2. Scroll down to the "List Menu Top Link" section Under Action (on the right), click Edit. Then, go back up in the "Add Menu Top Link" section (the Label and Link fields will be filled with your previous inputs). NOW CLICK ON THE FLAG OF THE LANGUAGE YOU WANT THE TRADUCTION OF (for example the Dutch flag...) The Label and Link fields remain filled with your inputs. The language automatically update to the Flag language in the Link field (for example : http://127.0.0.1/<yourthemefolder>/en/home to http://127.0.0.1/<yourthemefolder>/du(for Dutch)/home You can now edit the Label field into your disired Label for dutch language : (for example :Home -> to Thuis). 3. Finally, click edit (still in the "Add Menu Top" Section). Now You should have the Dutch equivalent page of the english hompage version link. 4. To display your new link (there's a unique one for all languages (the proper version (eng, Dutch etc.) will load automatically upon the normal language selected from your visitors)). Simply go a section above "Settings". Here scroll down the "Add" Field, and select your Home new Label under Top Horizontal Links, and simply click add. Then change it's position as you prefer. In closing : the "Please add a label for your default language." means "Please Add a (second foreign language) label to the default language (keeping the first link as unique reference)".
  6. Hi everyone, I want to edit source code of the template "order-Changed" from mailalerts email templates (Back-Office>Locatlization>Translations>Emails templates translations/yourtheme/your language>Modules Emails>mailalerts>order_changed) PS 1.6.1.10. When I try to open the source code it shows : No Subject was found for order_changed in the database. I looked at this post : https://www.prestashop.com/forums/topic/283562-no-subject-was-found-for-new-order-in-the-database/?p=1894031 It gives the following code for the new-order template : $_LANGMAIL['New order : #%d - %s'] = 'Nouvelle commande : #%d - %s'; ...to paste in : /themes/yourtheme/mails/lang/yourlang.php My question is : what extra piece of code (completing the $_LANGMAIL[...) do I need to do the same as above (paste in /themes/yourtheme/mails/lang/yourlang.php) for the order_changed template to show in source code Office>Locatlization>Translations>Emails templates translations/yourtheme/your language>Modules Emails>mailalerts>order_changed) ? Additionally : I have other email templates missing with the same message No Subject was found for <other template> in the database. They too are absent form the /themes/yourtheme/mails/lang/yourlang.php file. Is there an easy way to find the needed codes for all missing templates ? Thanks for any help provided.
  7. Hi again, I found that the last method still customizes css elements like the currencies , languages and CMS links in the footer (My account, Information etc.), as same as the More Info tabs customisation. Following the same thinking as the firebug tuto one, I just WENT BACK to the very first HTML next up hierarchy level .... which is a <li>....</li> (before the <ul id="more_info_tabs" class="idTabs idTabsShort clearfix") In my case the <li>...</li> in red below: <!-- Out of stock hook --> <div id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}> {$HOOK_PRODUCT_OOS} </div> {capture name='DisplaySocialSharing'}{hook h='DisplaySocialSharing'}{/capture} {if $smarty.capture.DisplaySocialSharing} {$smarty.capture.DisplaySocialSharing} {/if} </div> <!-- end center infos--> {if !$content_only} <div class="more-info col-xs-12"> <ul id="more_info_tabs" class="idTabs idTabsShort clearfix"> {if $product->description}<li class="first"><a id="more_info_tab_more_info" href="#idTab1"><span>{l s='More info'}</a></span></li>{/if} {if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if} {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if} {if isset($product) && $product->customizable}<li><a href="#idTab10">{l s='Product customization'}</a></li>{/if} <a href="{$link->getPageLink('contact')}?content_only=1" id="contact-us-popup">Contact</a> <script> {literal} $(document).ready(function() { $('#contact-us-popup').fancybox({ type: 'ajax', autoDimensions: false, autoSize: false, width: 600, height: 'auto', afterShow: function() { $('.contact-form-box').submit(function(e) { e.preventDefault(); var formdata = new FormData($(this)[0]); formdata.append('submitMessage', 1); var that = $(this); $.ajax({ type: 'POST', data: formdata, url: $(this).attr('action'), contentType: false, processData: false, success: function(data){ var error = $($.parseHTML(data)).filter('.alert.alert-danger'); if(error.length > 0) that.prepend(error) else { // succes! var success = $($.parseHTML(data)).filter('.alert.alert-success'); that.fadeOut('fast', function(){ $(this).after(success) }); } } }) }); } }); }); {/literal} </script> {$HOOK_PRODUCT_TAB} </ul> So I first removed the position: relative; line-height: 25px; display: block; padding: 0 0 20px 0; text-transform: uppercase; color: #bebebe; font-size: 14px; font-weight: 700; font-family: Poppins; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in parameters I added before in global.css : ol, ul { list-style: none; position: relative; line-height: 25px; display: block; padding: 0 0 20px 0; text-transform: uppercase; color: #bebebe; font-size: 14px; font-weight: 700; font-family: Poppins; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in } Back into : ol, ul { list-style: none; } In order to get back the Footer CMS and currencies and languages not customized as previous. Then, since the HTML upper Hierarchical level must be independent from other elements (CMS footer, Currencies and languages, titles etc.), and more importantly also because it governs the other tabs (The More Info Tabs (More Info, Data Sheet, Review) are all enclosed by this HTML UPPER LEVEL) I JUST ADDED THIS <li> ... </li> HTML UPPER LEVEL to enclose the Contact us <a ...> </a> line : <!-- Out of stock hook --> <div id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}> {$HOOK_PRODUCT_OOS} </div> {capture name='DisplaySocialSharing'}{hook h='DisplaySocialSharing'}{/capture} {if $smarty.capture.DisplaySocialSharing} {$smarty.capture.DisplaySocialSharing} {/if} </div> <!-- end center infos--> {if !$content_only} <div class="more-info col-xs-12"> <ul id="more_info_tabs" class="idTabs idTabsShort clearfix"> {if $product->description}<li class="first"><a id="more_info_tab_more_info" href="#idTab1"><span>{l s='More info'}</a></span></li>{/if} {if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if} {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if} {if isset($product) && $product->customizable}<li><a href="#idTab10">{l s='Product customization'}</a></li>{/if} <li><a href="{$link->getPageLink('contact')}?content_only=1" id="contact-us-popup">Contact</a></li> <script> {literal} $(document).ready(function() { $('#contact-us-popup').fancybox({ type: 'ajax', autoDimensions: false, autoSize: false, width: 600, height: 'auto', afterShow: function() { $('.contact-form-box').submit(function(e) { e.preventDefault(); var formdata = new FormData($(this)[0]); formdata.append('submitMessage', 1); var that = $(this); $.ajax({ type: 'POST', data: formdata, url: $(this).attr('action'), contentType: false, processData: false, success: function(data){ var error = $($.parseHTML(data)).filter('.alert.alert-danger'); if(error.length > 0) that.prepend(error) else { // succes! var success = $($.parseHTML(data)).filter('.alert.alert-success'); that.fadeOut('fast', function(){ $(this).after(success) }); } } }) }); } }); }); {/literal} </script> {$HOOK_PRODUCT_TAB} </ul> Then thinking that the hierarchy applies to the to the other <li>...</li> <ul id="more_info_tabs" class="idTabs idTabsShort clearfix"> {if $product->description}<li class="first"><a id="more_info_tab_more_info" href="#idTab1"><span>{l s='More info'}</a></span></li>{/if} {if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if} {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if} {if isset($product) && $product->customizable}<li><a href="#idTab10">{l s='Product customization'}</a></li>{/if} <li><a href="{$link->getPageLink('contact')}?content_only=1" id="contact-us-popup">Contact</a></li> (I figured) It must apply to the new item of the <li> ... </li>s as well !!!! So, I WENT BACK again to the product.css file and edited the corresponding to the HTML upper level <ul id="more_info_tabs" class="idTabs idTabsShort clearfix" : .more-info>ul { float: left; min-width: 145px; } (instead of the css higher one : .more-info { display: inline-block; margin-bottom: 30px; margin-top: 50px }) corresponding to the HTML <div class="more-info col-xs-12"> into this : .more-info>ul { float: left; min-width: 145px; position: relative; line-height: 25px; display: block; padding: 0 0 20px 0; text-transform: uppercase; color: #bebebe; font-size: 14px; font-weight: 700; font-family: Poppins; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in } The result is as I wanted : Sometimes you definitely must go two or three steps back in order to reach the bottom line I will also look at A2 Hosting plans for when I launch (hopefully by next week) : www.a2hosting.com Looks great! All the best!
  8. Hi Nemo, I'm new to Prestashop and editing-programming, please excuse the approximative wording/references. I have a question about the text customization of the "contact us" on the product page. I added the Contact Us form link in the More Info Tabs block section (instead of below the Out of Stock section) in the product.tpl file. Through inspecting it with Chrome, I found that the "Contact Us" text is ruled by the global.css, by defaut with following parameters: a { color: #777; text-decoration: none; } The More Info tabs block section has the following css parameters (from the product.css file): position: relative; line-height: 25px; display: block; padding: 0 0 20px 0; text-transform: uppercase; color: #bebebe; font-size: 14px; font-weight: 700; font-family: Poppins; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in; Since the "a" parameter in global.css (a { color: #777; text-decoration: none; }) applies to other elements (like the Titles etc.), we can't edit it by simply adding the product.css parameters ( position: relative; line-height: 25px; display: block; padding: 0 0 20px 0; text-transform: uppercase; color: #bebebe; font-size: 14px; font-weight: 700; font-family: Poppins; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in ) to it without applying the modification to those other elements as well, as I found out. To solve this, following another tutorial ( ), 5th min, I figured that we need to edit the HTML upper level in the hierarchy of global.css (instead of the <a href="http://127.0.0.1/<your theme folder>/fr/contact-us?content_only=1" id="contact-us-popup">Contact</a> product.css css parameters) - in order to specify the css customization only to the More Info Tabs (no more to other elements like the Titles etc.). The HTML upper level (<ul id="more_info_tabs" class="idTabs idTabsShort clearfix") displayed the following css on Chrome styles : ol, ul { list-style: none; } So I did edit the global.css ol, ul { list-style: none; } parameters with the contact Us product.css parameters, as follows: ol, ul { list-style: none; position: relative; line-height: 25px; display: block; padding: 0 0 20px 0; text-transform: uppercase; color: #bebebe; font-size: 14px; font-weight: 700; font-family: Poppins; -webkit-transition: all 300ms ease-in; -moz-transition: all 300ms ease-in; -ms-transition: all 300ms ease-in; -o-transition: all 300ms ease-in; transition: all 300ms ease-in } The results is ok (as shown in the below picture), but for some reason the CONTACT tab is still displaying the #777 color of the original css ({ color: #777; text-decoration: none; }) I want to ask you how can we change the #777 color to #bebebe (without editing the #777 of ({ color: #777; text-decoration: none; }) parameter) ? many thanks for your advice and great tutorials!
  9. Here's a great way to add the default contact form to the Product page : https://www.prestashop.com/forums/topic/564724-creating-an-ajax-contact-form-on-the-product-page/?p=2433279 For the code shown in the vid above ready to copy : https://www.prestashop.com/forums/topic/564724-creating-an-ajax-contact-form-on-the-product-page/?p=2604958 File to edit : product.tpl flie location : themes/<your theme folder>/product.tpl <a href="{$link->getPageLink('contact')}?content_only=1" id="contact-us-popup">Contact Us</a> <script> {literal} $(document).ready(function() { $('#contact-us-popup').fancybox({ type: 'ajax', autoDimensions: false, autoSize: false, width: 600, height: 'auto', afterShow: function() { $('.contact-form-box').submit(function(e) { e.preventDefault(); var formdata = new FormData($(this)[0]); formdata.append('submitMessage', 1); var that = $(this); $.ajax({ type: 'POST', data: formdata, url: $(this).attr('action'), contentType: false, processData: false, success: function(data){ var error = $($.parseHTML(data)).filter('.alert.alert-danger'); if(error.length > 0) that.prepend(error) else { // succes! var success = $($.parseHTML(data)).filter('.alert.alert-success'); that.fadeOut('fast', function(){ $(this).after(success) }); } } }) }); } }); }); {/literal} </script> Credits : http://nemops.com/prestashop-ajax-contact-form/#.WBhwB_nx6Uk
  10. Great tutorial, many thanks Nemo!!!! http://nemops.com/prestashop-ajax-contact-form/#.WBhwB_nx6Uk Here's the referenced piece of code : <a href="{$link->getPageLink('contact')}?content_only=1" id="contact-us-popup">Contact Us</a> <script> {literal} $(document).ready(function() { $('#contact-us-popup').fancybox({ type: 'ajax', autoDimensions: false, autoSize: false, width: 600, height: 'auto', afterShow: function() { $('.contact-form-box').submit(function(e) { e.preventDefault(); var formdata = new FormData($(this)[0]); formdata.append('submitMessage', 1); var that = $(this); $.ajax({ type: 'POST', data: formdata, url: $(this).attr('action'), contentType: false, processData: false, success: function(data){ var error = $($.parseHTML(data)).filter('.alert.alert-danger'); if(error.length > 0) that.prepend(error) else { // succes! var success = $($.parseHTML(data)).filter('.alert.alert-success'); that.fadeOut('fast', function(){ $(this).after(success) }); } } }) }); } }); }); {/literal} </script>
  11. Hi, I did as suggested. Here are 2 red entries :  jquery-1.11.0.min.js:4 GET http://127.0.0.1/merchant/merchant_1/index.php?controller=AdminProduc…ction=Associations&updateproduct&ajax=1&rand=1504042914124&_=1504042911703 500 (Internal Server Error) send @ jquery-1.11.0.min.js:4 ajax @ jquery-1.11.0.min.js:4 ProductTabsManager.display @ products.js:117 ProductTabsManager.displayBulk @ products.js:166 (anonymous) @ products.js:208 setTimeout (async) ProductTabsManager.displayBulk @ products.js:205 (anonymous) @ products.js:208 setTimeout (async) ProductTabsManager.displayBulk @ products.js:205 (anonymous) @ index.php?controller=AdminProducts&id_product=1&updateproduct&token=bdfe37a…:1152 dispatch @ jquery-1.11.0.min.js:3 r.handle @ jquery-1.11.0.min.js:3 jquery-1.11.0.min.js:4 GET http://127.0.0.1/merchant/merchant_1/index.php?controller=AdminProduc…oduct=1&action=Seo&updateproduct&ajax=1&rand=1504042914105&_=1504042911702 500 (Internal Server Error) send @ jquery-1.11.0.min.js:4 ajax @ jquery-1.11.0.min.js:4 ProductTabsManager.display @ products.js:117 ProductTabsManager.displayBulk @ products.js:166 (anonymous) @ products.js:208 setTimeout (async) ProductTabsManager.displayBulk @ products.js:205 (anonymous) @ index.php?controller=AdminProducts&id_product=1&updateproduct&token=bdfe37a…:1152 dispatch @ jquery-1.11.0.min.js:3 r.handle @ jquery-1.11.0.min.js:3 Any further suggestion on how to handle the issue? Thanks for any help provided.
  12. [sOLUTION] Miracle!! I just found it (after several hours looking around... ASK and you shall receive ): It was the category.tpl following line : <!-- Subcategories -- That needed the closing '' > '' like this : <!-- Subcategories -- > Need also to delete the opening and closing "<!-- -- > " of the {if isset($subcategories)} (or else the " --> " characters of the above appears on the category page)
  13. Hi everyone, My theme doesn't display the subcategories on the categorie page by default. I've been looking around in the forum to find how to display / reenable the Subcategories displaying on the Categorie page. My Prestashop version is : 1.6.1.10. I've looked too here, but it applies only to PS 1.7 : https://mypresta.eu/prestashop-17/display-available-subcategories.html. I've looked at the category.tpl in my theme's folder (C:\wamp64\www\leria\themes\leria\category.tpl) Here's the code : *} {include file="$tpl_dir./errors.tpl"} {if isset($category)} {if $category->id AND $category->active} {if $scenes || $category->description || $category->id_image} <div class="content_scene_cat"> {if $scenes} <div class="content_scene"> <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {if $category->description} <div class="cat_desc rte"> {if Tools::strlen($category->description) > 350} <div id="category_description_short">{$description_short}</div> <div id="category_description_full" class="unvisible">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} </div> {else} <!-- Category image --> <div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}> {if $category->description} <div class="cat_desc"> <span class="category-name"> {strip} {$category->name|escape:'html':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'} {/if} {/strip} </span> {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} </div> {/if} </div> {/if} </div> {/if} <h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span>{include file="$tpl_dir./category-count.tpl"}</h1> <!--{if isset($subcategories)} {if (isset($display_subcategories) && $display_subcategories eq 1) || !isset($display_subcategories) } <!-- Subcategories -- <div id="subcategories"> <p class="subcategory-heading">{l s='Subcategories'}</p> <ul class="clearfix"> {foreach from=$subcategories item=subcategory} <li> <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> </div> <h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'}</a></h5> {if $subcategory.description} <div class="cat_desc">{$subcategory.description}</div> {/if} </li> {/foreach} </ul> </div> {/if} {/if} --> {if $products} <div class="content_sortPagiBar clearfix"> <div class="sortPagiBar clearfix"> {include file="./product-compare.tpl"} {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar"> <div class="bottom-pagination-content clearfix"> {include file="./product-compare.tpl" paginationId='bottom'} {include file="./pagination.tpl" paginationId='bottom'} </div> </div> {/if} {elseif $category->id} <p class="alert alert-warning">{l s='This category is currently unavailable.'}</p> {/if} {/if} And too at the category.css (C:\wamp64\www\leria\themes\leria\css\category.css) Here is the code : .content_scene_cat { color: #d7d7d7; line-height: 19px; margin: 0 0 26px 0 } .content_scene_cat .content_scene_cat_bg { padding: 18px 10px 10px 42px } @media (max-width: 1199px) { .content_scene_cat .content_scene_cat_bg { padding: 10px 10px 10px 15px } } .content_scene_cat span.category-name { font-size: 30px; font-weight: 600; text-transform: uppercase; line-height: 50px; color: #fff; margin-bottom: 12px } @media (max-width: 1199px) { .content_scene_cat span.category-name { font-size: 25px; line-height: 30px } } .content_scene_cat p { margin-bottom: 0 } .content_scene_cat a { color: #fff } .content_scene_cat a:hover { text-decoration: underline } .content_scene_cat .content_scene { color: #666 } .content_scene_cat .content_scene .cat_desc { padding-top: 20px } .content_scene_cat .content_scene .cat_desc a { color: #777 } .content_scene_cat .content_scene .cat_desc a:hover { color: #515151 } #subcategories { border-top: 1px solid #ebebeb; padding: 15px 0 0px 0 } #subcategories p.subcategory-heading { font-weight: bold; color: #333; margin: 0 0 15px 0 } #subcategories ul { margin: 0 0 0 -20px } #subcategories ul li { float: left; width: 145px; margin: 0 0 13px 33px; text-align: center; height: 202px } #subcategories ul li .subcategory-image { padding: 0 0 8px 0 } #subcategories ul li .subcategory-image a { display: block; padding: 9px; border: 1px solid #ebebeb } #subcategories ul li .subcategory-image a img { max-width: 100%; vertical-align: top } #subcategories ul li .subcategory-name { font: 600 18px/22px "Open Sans", sans-serif; color: #555454; text-transform: uppercase } #subcategories ul li .subcategory-name:hover { color: #515151 } #subcategories ul li .cat_desc { display: none } #subcategories ul li:hover .subcategory-image a { border: 5px solid #333; padding: 5px } Can please someone suggest how I could make the subcategories visible on the categorie page (like in the attached image)? Any point I'm not aware of in the code above or needs in other files? What I want is the default Prestashop 1.6 subcategories list normal behavior : i.e. when I click on the categories title/links on the menu to get the subcategories displaying on the center column (not just the products). Many thanks for any help provided.
  14. For some reason the theme file is too big despite only 4.68M. I can send the theme file if needed. Here's the email: abdillokra@gmail.com
  15. Hello everyone, Responding to the last post by Kazeno, Could anyone advise the way to find the required missing template to solve the error? I got into the code and found the following around line 678: /** * get Smarty property in template context * * @param string $property_name property name * * @throws SmartyException */ public function __get($property_name) { switch ($property_name) { case 'source': if (strlen($this->template_resource) == 0) { **** 678 ** **throw new SmartyException('Missing template name'); }**** $this->source = Smarty_Resource::source($this); // cache template object under a unique ID // do not cache eval resources if ($this->source->type != 'eval') { if ($this->smarty->allow_ambiguous_resources) { $_templateId = $this->source->unique_resource . $this->cache_id . $this->compile_id; } else { $_templateId = $this->smarty->joined_template_dir . '#' . $this->template_resource . $this->cache_id . $this->compile_id; } How can we find the responsible missing template name ? I've attached the theme (with over 260 .tpl. files). What is the way to find the necessary missing template name? Thank you for your directions and help.
×