Jump to content

Emzed

Members
  • Posts

    50
  • Joined

  • Last visited

Profile Information

  • Location
    Sydney, Australia
  • Activity
    Freelancer

Recent Profile Visitors

2,946,596 profile views

Emzed's Achievements

Newbie

Newbie (1/14)

10

Reputation

  1. Hi navid68, I don‘t have access to a computer and won‘t for a while but judging from memory it might not be straightforward to modify the module. I haven‘t used Prestashop for a long time now since my projects have changed so I‘ve inactivated my Prestashop testing environment after updating my working environment. When I return home if I get the time I hope to check out the raw code. Cheers
  2. Hi kingboy1027, Thanks for the update. I was skeptical about that function working under all scenarios since I haven't tested it and don't have a test shop that is multi-shop, supports more than 1 country, supports more than 1 currency, uses group-specific pricing or uses various minimum quantity amounts per product. I'll need to check out the Product class's priceCalculation function again to investigate how it works with the parameters and what could cause such a high value. If you have time it would be great if you could post from your ps_specific_price table the various lines for a particular id_product, that include id_shop, id_country, id_currency, id_group and from_quantity. Cheers
  3. Hi kingboy1027, That's interesting. Is only one product affected? And has a specific price been set for the product, and if so, was a percentage or fixed discount used? I'm a bit busy now with a medical emergency but I'll try help as much as I can. Cheers
  4. I might add taxes to the minimum indexed prices as well in an updated version (unless someone can justify otherwise). I was unsure whether this was an obvious bug or an intentional (yet unusual) feature so I previously left it as is.
  5. Hey, Here's what Prestashop 1.5.4.1's default theme adds to the footer: {if $PS_ALLOW_MOBILE_DEVICE} <p class="center clearBoth"><a href="{$link->getPageLink('index', true)}?mobile_theme_ok">{l s='Browse the mobile site'}</a></p> {/if} Note the "?mobile_theme_ok" argument, which you can try adding to any url (the code above defaults to the "index" page). The inverse argument is "?no_mobile_theme". Cheers
  6. Last time I checked I believe the demo was still showing the v1.4 mobile theme.
  7. http://www.prestashop.com/forums/topic/285562-custom-class-for-body-depending-on-category/?view=findpost&p=1440260
  8. I don't know how robust this is across different versions of PS1.5.x but there is a native function in the category class called getParentsCategories() you can assign to obtain the entire chain of parent categories. In my Prestashop setup (v 1.5.4.1) it appears the default category is automatically fetched for a product page and there's no need to call $product->id_category_default in your header.tpl nor extract any smarty GET variables (unlike v1.4.x where the header.tpl was fetched separately and new category instances needed to be created). Within CategoryController.php's initContent() function you can add something like 'parent_category_chain' => $this->category->getParentsCategories(), to the "$this->context->smarty->assign(array(" smarty assignment. Then in your header.tpl you can use a foreach loop to only add a category id number where the level_depth of categories is equal to 2 (which would all have a parent category of "home" respectively). Using your example, you could have something like <body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}{if $category->id}{if $category->level_depth eq 2} class="cat{$category->id}"{elseif $category->level_depth > 2}{foreach $parent_category_chain as $parent_category_node}{if $parent_category_node.level_depth eq 2} class="cat{$parent_category_node.id_category}"{/if}{/foreach}{/if}{/if}> Now you only need to create CSS variations for your top-level-category cat# classes. Cheers
  9. Hi strat813, Have you not tried the modified files posted above or do they still not work?
  10. I've only used it for a second but have you tried the free Infinite Ajax Scroll module at http://www.prestashop.com/forums/topic/232911-module-infinite-ajax-scroll-d%C3%A9filement-infini-en-ajax/?do=findComment&comment=1145759? At the time of writing the author believed it to be the only infinite scrolling module that supports layered navigation - and it's free! If you decide to use it, make sure you replace or create /theme/your-theme/js/modules/blocklayered/blocklayered.js with the file in post #18 http://www.prestashop.com/forums/topic/232911-module-infinite-ajax-scroll-d%C3%A9filement-infini-en-ajax/?do=findComment&comment=1225025.
  11. Hey, The layered navigation module requires a category to be selected to function. A workaround to your problem would be to replace manufacturer links with custom links to a category of home category (2) and the appropriate selection of filters e.g. in the default installation - Shure Incorporated http://www.yourshop.com/index.php?id_category=2&selected_filters=manufacturer-shure_incorporated&controller=category Apple Computer Inc http://www.yourshop.com/index.php?id_category=2&selected_filters=manufacturer-apple_computer_inc&controller=category
  12. New version is available for download above (19Oct2013-blocklayered.php). It now works when taxes haven't been added. Kent, please try the latest version. vincegx, I know you've already paid a freelancer to make some sorting changes to the original modification but you can use a tool like quickdiff.com to see the new changes to the updated file.
  13. I have modified the php file once again so that the index works correctly without the addition of taxes. I have changed this part... if (Configuration::get('PS_LAYERED_FILTER_PRICE_USETAX')) $max_tax_rate = Db::getInstance()->getValue(' SELECT max(t.rate) max_rate FROM `'._DB_PREFIX_.'product_shop` p LEFT JOIN `'._DB_PREFIX_.'tax_rules_group` trg ON (trg.id_tax_rules_group = p.id_tax_rules_group AND p.id_shop = '.(int)$shop_list.') LEFT JOIN `'._DB_PREFIX_.'tax_rule` tr ON (tr.id_tax_rules_group = trg.id_tax_rules_group) LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.id_tax = tr.id_tax AND t.active = 1) WHERE id_product = '.(int)$id_product.' GROUP BY id_product'); else $max_tax_rate = 0; to this... $max_tax_rate = Db::getInstance()->getValue(' SELECT max(t.rate) max_rate FROM `'._DB_PREFIX_.'product_shop` p LEFT JOIN `'._DB_PREFIX_.'tax_rules_group` trg ON (trg.id_tax_rules_group = p.id_tax_rules_group AND p.id_shop = '.(int)$shop_list.') LEFT JOIN `'._DB_PREFIX_.'tax_rule` tr ON (tr.id_tax_rules_group = trg.id_tax_rules_group) LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.id_tax = tr.id_tax AND t.active = 1) WHERE id_product = '.(int)$id_product.' GROUP BY id_product'); $max_tax_rate_for_reduction = $max_tax_rate; if (!Configuration::get('PS_LAYERED_FILTER_PRICE_USETAX')) $max_tax_rate = 0; Note that I maintained the assumption from the original file that if $max_tax_rate_for_reduction or $max_tax_rate are NULL, PHP will automatically cast them to zero when used in arithmetic. I then use $max_tax_rate_for_reduction in place of $max_tax_rate to subtract the discounts properly from the prices in my previous modification (but I still use $max_tax_rate on the indexed min_price to form the max_price). v3-155-blocklayered.php - Rename to blocklayered.php 155-blocklayered.tpl.txt - Rename to blocklayered.tpl
×
×
  • Create New...