Jump to content


  • Posts

  • Joined

  • Last visited

apug's Achievements


Newbie (1/14)



  1. Hi bonbontamura, I think you have to repeat your thanks :-P because I found the problem: in your site there are tree links with id="button_order_cart" you have to rename two of them another solution (but I didn't try it ) could be to change line $('#button_order_cart').fadeIn('slow'); in $('#cart-buttons #button_order_cart').fadeIn('slow'); bye^2
  2. Hi bonbontamura, can you compare old and new version of ajax-cart.js? the code that hide the button when you remove the last product is inside an "else" block; the code that shows the button ( $('#button_order_cart').fadeIn('slow'); ) must be inside the "if" block if(parseInt(jsonData.nbTotalProducts) > 0) Yes, it's possible, you can swap the link with an image or add a css class "disabled" with a different background-image and unbind onclick event. But first you have to solve your problem because you have to do it in that block of code Bye^2
  3. I noticed that when you load a page and your cart is empty the button is visible for a moment and than disappears. To avoid this behaviour add style="display:none" to the button (file blockcart.tpl)
  4. In my installation it's perfect. Are you using PS Is ajax enabled? What happens when you remove the last product from the cart? Can you verify if the updateCartEverywhere is called each time you add a product? (with firebug or with an alert in the code)
  5. Hi, If you're using version you must edit the function updateCartEverywhere (line 555) in file modules/blockcart/ajax-cart.js from line 565 to 567 BEFORE: $('.ajax_cart_quantity').fadeIn('slow'); $('.ajax_cart_total').fadeIn('slow'); AFTER: $('.ajax_cart_quantity').fadeIn('slow'); $('.ajax_cart_total').fadeIn('slow'); $('#button_order_cart').fadeIn('slow'); at line 593 BEFORE: $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each( function () { AFTER: $('#button_order_cart, .ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each( function () {
  6. This is the first version of my module https://github.com/apug/downloadalert It's a beta release, use it at your own risk ;-)
  7. Thank you for your reply, but this isn't what I need. My english isn't so good and I guess maybe I haven't explained well My question should have been "How do I call my module from cron?" or "Is there a generic front controller?" ... Never mind, I think found the answer in birthdaypresent module Thank you. A.
  8. Hi, I'm using downloadable products and I would like to send an email to the customer one week before expiration. Is it currently possible? If no, can someone give me any tip? (I don't yet know very well the prestashop architecture). Thanks. A.
  9. 1. Go to your modules folder and make a copy/duplicate of your blockcategories folder and rename it with blockcategories2 for example. 2. Enter in the blockcategories2 folder and rename the blockcategories.tpl and blockcategories.php to blockcategories2.tpl and blockcategories2.php. 3. Open up your blockcategories2.php and replace all blockcategories words to blockcategories2. 4. in blockcategories2.php replace hookLeftColumn method with: public function hookLeftColumn($params) { global $smarty, $cookie; $id_customer = (int)($params['cookie']->id_customer); $id_group = $id_customer ? Customer::getDefaultGroupId($id_customer) : _PS_DEFAULT_CUSTOMER_GROUP_; $id_product = (int)(Tools::getValue('id_product', 0)); $id_category = (int)(Tools::getValue('id_category', 0)); $id_lang = (int)($params['cookie']->id_lang); $smartyCacheId = 'blockcategories2|'.$id_group.'_'.$id_lang.'_'.$id_product.'_'.$id_category; if($id_category) $category = new CategoryCore($id_category,$id_lang); else $category = Category::getRootCategory ($id_lang); $id_category = $category->id; Tools::enableCache(); if (!$this->isCached('blockcategories2.tpl', $smartyCacheId)) { $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH'); if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT c.id_parent, c.id_category,c.nleft,c.nright, cl.name, cl.description, cl.link_rewrite FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.') LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE (c.`active` = 1 OR c.`id_category` = 1) '.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').' AND cg.`id_group` = '.$id_group.' AND c.nleft >= '.$category->nleft.' AND c.nright <= '.$category->nright.' ORDER BY `level_depth` ASC, c.`position` ASC') ) return; $resultParents = array(); $resultIds = array(); foreach ($result as &$row) { $resultParents[$row['id_parent']][] = &$row; $resultIds[$row['id_category']] = &$row; } $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH'),$id_category); unset($resultParents); unset($resultIds); $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false); if (Tools::isSubmit('id_category')) { $cookie->last_visited_category = $id_category; $smarty->assign('currentCategoryId', $cookie->last_visited_category); } if (Tools::isSubmit('id_product')) { if (!isset($cookie->last_visited_category) OR !Product::idIsOnCategoryId($id_product, array('0' => array('id_category' => $cookie->last_visited_category)))) { $product = new Product($id_product); if (isset($product) AND Validate::isLoadedObject($product)) $cookie->last_visited_category = (int)($product->id_category_default); } $smarty->assign('currentCategoryId', (int)($cookie->last_visited_category)); } $smarty->assign('blockCategTree', $blockCategTree); if (file_exists(_PS_THEME_DIR_.'modules/blockcategories2/blockcategories2.tpl')) $smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories2/category-tree-branch.tpl'); else $smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories2/category-tree-branch.tpl'); $smarty->assign('isDhtml', $isDhtml); } $smarty->cache_lifetime = 31536000; // 1 Year $display = $this->display(__FILE__, 'blockcategories2.tpl', $smartyCacheId); Tools::restoreCacheSettings(); return $display; } Credits: steps 1, 2 and 3 come from Dharani's Blog
  • Create New...