Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by irder

  1. i tried to modify it,  in  /override/classes/Language.php (override /classes/Language.php)


    add a new function to judge is current langue activated for this shop,

    public static function isLanguageActivatedForThisShop($id_shop = null,$id_lang = null)
             if (isset(Context::getContext()->shop) && is_object(Context::getContext()->shop) && $id_shop === null) {
                $id_shop = (int)Context::getContext()->shop->id;
                 $ActiveLanguages = Db::getInstance()->getValue('
    				SELECT COUNT(*) FROM `'._DB_PREFIX_.'lang` l
    				JOIN '._DB_PREFIX_.'lang_shop lang_shop ON (lang_shop.id_lang = l.id_lang AND lang_shop.id_shop = '.(int)$id_shop.')
    				WHERE l.`active` = 1 and l.`id_lang` = '.(int)$id_lang
            return ($ActiveLanguages>0 );


    modify   /override/classes/Tools.php

    if (Validate::isLoadedObject($language) && $language->active) {
                    $context->language = $language;


    if (Language::isLanguageActivatedForThisShop($context->shop->id,$id_lang) && Validate::isLoadedObject($language) && $language->active) {
                    $context->language = $language;

    it seems work ok now

  2. thank you,good module,





    i use it in  http://www.nowsel.com/en/nowsel-blog.html


    there are 2 points,


    1.the friendly url of blog should inclue "-" not "_"

    2.if you only install the module in some shops ,you should select your shop before operation,


    or the error  

    • Bad SQL query
      Unknown column 'a.smart_blog_post' in 'group statement'          appear    
  3. duplicate product attribute problem with the blockwishList  moudule


    as the image showing in BO,


    S, Violet, S, Violet, S, Violet, S, Violet, S, Violet, S, Violet, S, Violet, S, Violet



    it seems caused by    Shop::addSqlAssociation('product_attribute', 'pa').'   in




    $result = Db::getInstance()->executeS('

    SELECT al.`name` AS attribute_name, pa.`quantity` AS "attribute_quantity"
    FROM `'._DB_PREFIX_.'product_attribute_combination` pac
    LEFT JOIN `'._DB_PREFIX_.'attribute` a ON (a.`id_attribute` = pac.`id_attribute`)
    LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON (ag.`id_attribute_group` = a.`id_attribute_group`)
    LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)($id_lang).')
    LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)($id_lang).')
    LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
    '.Shop::addSqlAssociation('product_attribute', 'pa').'


    anybody can solve it?  thank you

  • Create New...

Important Information

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