Jump to content

alexidro

Members
  • Posts

    26
  • Joined

  • Last visited

About alexidro

  • Birthday 11/09/1985

Profile Information

  • Location
    Bologna
  • Activity
    Agency

Recent Profile Visitors

2,639,363 profile views

alexidro's Achievements

Newbie

Newbie (1/14)

4

Reputation

  1. For version 1.4 you must go in your [admin directory]/tabs/AdminHome.php and comment out or remove the following lines as below: // if (@ini_get('allow_url_fopen')) // { // $upgrade = new Upgrader(); // if($update = $upgrade->checkPSVersion()) // echo '<div class="warning warn" style="margin-bottom:30px;"><h3>'.$this->l('New PrestaShop version available').' : <a style="text-decoration: underline;" href="'.$update['link'].'" target="_blank">'.$this->l('Download').' '.$update['name'].'</a> !</h3></div>'; // } // else // { // echo '<p>'.$this->l('Update notification unavailable').'</p>'; // echo '<p> </p>'; // echo '<p>'.$this->l('To receive PrestaShop update warnings, you need to activate the <b>allow_url_fopen</b> command in your <b>php.ini</b> config file.').' [<a href="http://www.php.net/manual/'.$isoUser.'/ref.filesystem.php">'.$this->l('more info').'</a>]</p>'; // echo '<p>'.$this->l('If you don\'t know how to do that, please contact your host administrator !').'</p><br>'; // }
  2. Stesso problema anche qui, è proprio un bug! Se scopro qualcosa lo posterò sicuramente
  3. Here is the solution tested and working in Prestashop 1.4.7. You can follow these instructions below or just download the already modified files from the zip file attached here. Hope this helps. Open "blockcategories.php" in the folder /modules/blockcategories and find this lines of code (should start at line 140 or so): public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children); } And change them to this: public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; $ProductsCount = 0; $ProductsCount = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'category_product WHERE id_category = '. $id_category); return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children, 'products' => $ProductsCount); } Then open the file "category_tree_branch.tpl" that you find in the same folder /modules/blockcategory and find this line (should be line 41): <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> and change to this: <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} ({$node.products})</a> blockcategories_numbers_mod.zip
  4. Here is the solution tested and working in Prestashop 1.4.7. You can follow these instructions below or just download the already modified files from the zip file attached here. Hope this helps. Open "blockcategories.php" in the folder /modules/blockcategories and find this lines of code (should start at line 140 or so): public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children); } And change them to this: public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; $ProductsCount = 0; $ProductsCount = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'category_product WHERE id_category = '. $id_category); return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children, 'products' => $ProductsCount); } Then open the file "category_tree_branch.tpl" that you find in the same folder /modules/blockcategory and find this line (should be line 41): <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> and change to this: <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} ({$node.products})</a> blockcategories_numbers_mod.zip
  5. Here is the solution tested and working in Prestashop 1.4.7. You can follow these instructions below or just download the already modified files from the zip file attached here. Hope this helps. Open "blockcategories.php" in the folder /modules/blockcategories and find this lines of code (should start at line 140 or so): public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children); } And change them to this: public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; $ProductsCount = 0; $ProductsCount = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'category_product WHERE id_category = '. $id_category); return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children, 'products' => $ProductsCount); } Then open the file "category_tree_branch.tpl" that you find in the same folder /modules/blockcategory and find this line (should be line 41): <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> and change to this: <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} ({$node.products})</a> blockcategories_numbers_mod.zip
  6. Here is the solution tested and working in Prestashop 1.4.7. You can follow these instructions below or just download the already modified files from the zip file attached here. Hope this helps. Open "blockcategories.php" in the folder /modules/blockcategories and find this lines of code (should start at line 140 or so): public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children); } And change them to this: public function getTree($resultParents, $resultIds, $maxDepth, $id_category = 1, $currentDepth = 0) { global $link; $children = array(); if (isset($resultParents[$id_category]) AND sizeof($resultParents[$id_category]) AND ($maxDepth == 0 OR $currentDepth < $maxDepth)) foreach ($resultParents[$id_category] as $subcat) $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); if (!isset($resultIds[$id_category])) return false; $ProductsCount = 0; $ProductsCount = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'category_product WHERE id_category = '. $id_category); return array('id' => $id_category, 'link' => $link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], 'children' => $children, 'products' => $ProductsCount); } Then open the file "category_tree_branch.tpl" that you find in the same folder /modules/blockcategory and find this line (should be line 41): <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> and change to this: <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} ({$node.products})</a> blockcategories_numbers_mod.zip
  7. Go into the blocknewsletter.php file then find this code: function hookRightColumn($params) { return $this->hookLeftColumn($params); } and change it to this: function hookRightColumn($params) { return $this->hookLeftColumn($params); } function hookFooter($params) { return $this->hookLeftColumn($params); } Then go into the module positions tab in the back office and click "transplant a module", select "Newsletter Block" as module and "Footer" as hook and "save". And you have done! Tested and working in version 1.4.7
  8. you must go into the product.js of your theme folder and find the following code: if(typeof(firstTime) != 'undefined' && firstTime) refreshProductImages(0); else refreshProductImages(combinations[combination]['idCombination']); //leave the function because combination has been found return; then comment or delete the following lines like here: //if(typeof(firstTime) != 'undefined' && firstTime) // refreshProductImages(0); //else refreshProductImages(combinations[combination]['idCombination']); //leave the function because combination has been found return; Tested and working on version 1.4.7 Hope this helps Alessandro
  9. Hi, I was wondering how to get the second product image on the product-list.tpl. I wrote this simple module (see atachment) that uses jquery to show/hide second close-up image of the product on hoover, but doesn't works well with friendly urls and CCC optimizations enabled. I was wondering if there is a cleaner way like creating a new smarty variable to get this. What you suggest? Many thanks in advance.
  10. Hi, I have a custom module for product image enlargement that doesn't work after I enabled friendly urls. If I check the browser console I get: GET http://www.cosecosigioielli.com/it/gioielli-etnici/modules/blockProductSlide/css/style.css 404 (Not Found) GET http://www.cosecosigioielli.com/it/gioielli-etnici/modules/blockProductSlide/js/module.js 404 (Not Found) this is one the php interested lines in the module: $filename = _PS_THEME_DIR_.'/product-list.tpl'; $hfd = @fopen($filename, 'r'); $contents = @fread($hfd, filesize($filename)); $exp1 = array('class="product_img_link"'); $exp2 = array('class="product_img_link" rel="{$link->getImageLink($product.link_rewrite, $product.id_image1, \'home\')}"'); $contents = str_replace($exp2, $exp1, $contents).'<script type="text/javascript" src="{$base_dir}modules/blockProductSlide/js/module.js"></script>'; @fclose($hfd); $filename = _PS_THEME_DIR_.'/product-list.tpl'; $hfd = @fopen($filename, 'w'); @fwrite($hfd, $contents); @fclose($hfd); Why can't get that file from the modules dir? Have I missing something? You can check it here: http://www.cosecosig...gento-0490.html
  11. According to the Google +1 snippet cutomization, I was wondering ho to get the cover image of a product to insert a "meta itemprop" tag in the header.tpl of my theme. I wrote the following in the header.tpl, but don't works: <meta itemprop="image" content="{if $page_name == 'product'}{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}{else}http://www.filateliaduetorri.com/images/filatelia2torri.jpg{/if}"> In the rendered page I get: <meta itemprop="image" content="http://127.0.0.1/filatelia2torri/img/p/-large.jpg"> instead of: <meta itemprop="image" content="http://127.0.0.1/filatelia2torri/img/p/3/7/37-large.jpg"> Where is the error? Any help is really appreciated
  12. I have the same problem, can you tell us how you solved? I'm willing to extend the height of the buttons from a standard prestashop theme, I change the dimensions of the background images but when I go over with the mouse the effect reveal a not well alligned hover image. Also I used to do hover effect with sprites in the past to achieve the rollover, I don't understand the thing that trove said "3 layer pictures", is there a tutorial or a topic explaining how it works? many thanks, Alessandro
  13. To move the footer outside the div page wrapper simply open your footer.tpl file inside your theme folder and change this code: <!-- Footer --> {$HOOK_FOOTER} to this: <!-- Footer --> {$HOOK_FOOTER}
×
×
  • Create New...