Shoply Theme / Template of Envato Dev IQUIT (Warehouse theme): ISSUES



  • Hello

    our live shop runs now TB1.3 with the Shoply theme. Most is more than fine and I am so happy.

    But actually I am aware of three bugs I can not solve myself.
    I use the Shoply Template from the same developer IQUIT author Warehouse theme. I have some critical issues:

    • SSL mixed content on product pages (backoffice settings: SSL yes, SSL on whole site yes!)

    • product page does not load (white page) if Shoply’s Products ratings on product page v1.0 - von IQIT-COMMERCE.COM (Add Stars under product title) is activated (installed only is fine) in combination with ThirtyBees “product comments”

    • PayPal with PayPal Login actived in settings of module crashes cart page (Login deactivated seems to be fine. Express Checkout and PayPal pay work)

    Relating to SSL/mixed content: Browser developer tools tell me that all images of product pages (product image, images of ‘customers bought also’, ‘more products of same manufacturer’ etc. are loaded via HTTP:\).

    Relating to product commment the author IQUIT of Warhouse & Shoply theme maintains that his themes are compatible with PS. IQUIT’s “products ratings” module works only if “product comments” is installed, he says. I found also references on the web that the author said Warehouse would be compatible with Thirty Bees. Anyhow, no replies or comments on Shoply theme.

    More details:
    I can tell that in Warehouse the module is named: RatingsProductlist
    I can tell that in Warehouse the module is named: ratingsproductpage

    Warehouse that differs from Shopl’s:

    
    	public function hookproductratingHook($params) {
    
    		$product = $params['productid'];
    
    		include_once (_PS_MODULE_DIR_ . 'productcomments/ProductComment.php');
    		if (!isset($product)) {
    			return;
    		}
    		$grade = ProductComment::getAverageGrade($product);
    		$this -> context -> smarty -> assign(array('empty_grade' => 1));
    		if (isset($grade['grade']))
    			$this -> context -> smarty -> assign(array('empty_grade' => 0));
    		$this -> context -> smarty -> assign(array(
    			'average_total' => round($grade['grade']),
    			'nbComments' => (int)(ProductComment::getCommentNumber((int)$product))
    			));
    
    
    		$this -> context -> smarty -> assign((int)(ProductComment::getCommentNumber((int)$product)));
    
    		return ($this -> display(__FILE__, 'ratingsproductlist.tpl'));
    
    	}```
    
    Shoply' code:
    

    public function hookproductratingHook($params)
    {

        $product = $params['productid'];
    
        include_once _PS_MODULE_DIR_ . 'productcomments/ProductComment.php';
        if (!isset($product)) {
            return;
        }
        $grade = ProductComment::getAverageGrade($product);
        $this->context->smarty->assign(array('empty_grade' => 1));
        if (isset($grade['grade'])) {
            $this->context->smarty->assign(array('empty_grade' => 0));
        }
    
        $this->context->smarty->assign(array(
            'average_total' => round($grade['grade']),
            'nbComments' => (int) (ProductComment::getCommentNumber((int) $product)),
        ));
    
        $this->context->smarty->assign((int) (ProductComment::getCommentNumber((int) $product)));
    
        return ($this->display(__FILE__, 'ratingsproductpage.tpl'));
    
    }```
    

    Code differs in ==>

    include_once (_PS_MODULE_DIR_ . 'productcomments/ProductComment.php');```
    

    if (isset($grade[‘grade’])) {
    $this->context->smarty->assign(array(‘empty_grade’ => 0));
    }```

    If that is the cause I can not tell at the moment since I got the code via web and cannot test.



  • Relating to the products comments / product rating isse:

    I just edited my Shoply product ratings module to the code of Warehouse but the crashing of product page remains.

    Debug Mode:

    Notice: Undefined index: id_category_default in C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php on line 1676 
    Call Stack: 0.0005 143208 1. {main}() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:0 0.1757 9274480 
    2. DispatcherCore->dispatch() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:33 0.2086 12144048 
    3. ControllerCore->run() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Dispatcher.php:743 0.2870 15606568 4. ProductControllerCore->initContent() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\controller\Controller.php:366 0.7255 29142536 
    5. ProductControllerCore->assignCategory() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:274 0.7383 29165536 
    6. HookCore::exec() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:511 0.7383 29165696 
    7. HookCore::execWithoutCache() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:280 1.0765 30654152 
    8. HookCore::coreCallHook() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:489 1.0765 30654248 
    9. CrossSelling_Mod->hookProductFooter() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:771 1.0796 30664584 
    10. CrossSelling_Mod->getOrderProducts() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:263 1.1324 30873152 
    11. ProductCore::getProductsProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:210 1.1324 30873744 
    12. ProductCore::getProductProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php:1619 
    
    Notice: Undefined index: id_category_default in C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php on line 1676 Call Stack: 0.0005 143208 
    1. {main}() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:0 0.1757 9274480 
    2. DispatcherCore->dispatch() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:33 0.2086 12144048 
    3. ControllerCore->run() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Dispatcher.php:743 0.2870 15606568 4. ProductControllerCore->initContent() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\controller\Controller.php:366 0.7255 29142536 
    5. ProductControllerCore->assignCategory() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:274 0.7383 29165536 
    6. HookCore::exec() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:511 0.7383 29165696 
    7. HookCore::execWithoutCache() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:280 1.0765 30654152 
    8. HookCore::coreCallHook() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:489 1.0765 30654248 
    9. CrossSelling_Mod->hookProductFooter() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:771 1.0796 30664584 
    10. CrossSelling_Mod->getOrderProducts() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:263 1.1324 30873152 
    11. ProductCore::getProductsProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:210 1.1356 30880424 
    12. ProductCore::getProductProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php:1619 
    
    Notice: Undefined index: id_category_default in C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php on line 1676 Call Stack: 0.0005 143208 
    1. {main}() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:0 0.1757 9274480 
    2. DispatcherCore->dispatch() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:33 0.2086 12144048 
    3. ControllerCore->run() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Dispatcher.php:743 0.2870 15606568 
    4. ProductControllerCore->initContent() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\controller\Controller.php:366 0.7255 29142536 
    5. ProductControllerCore->assignCategory() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:274 0.7383 29165536 
    6. HookCore::exec() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:511 0.7383 29165696 
    7. HookCore::execWithoutCache() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:280 1.0765 30654152 
    8. HookCore::coreCallHook() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:489 1.0765 30654248 
    9. CrossSelling_Mod->hookProductFooter() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:771 1.0796 30664584 
    10. CrossSelling_Mod->getOrderProducts() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:263 1.1324 30873152 
    11. ProductCore::getProductsProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:210 1.1391 30884240 
    12. ProductCore::getProductProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php:1619 
    
    Notice: Undefined index: id_category_default in C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php on line 1676 Call Stack: 0.0005 143208 
    1. {main}() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:0 0.1757 9274480 
    2. DispatcherCore->dispatch() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:33 0.2086 12144048 
    3. ControllerCore->run() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Dispatcher.php:743 0.2870 15606568 
    4. ProductControllerCore->initContent() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\controller\Controller.php:366 0.7255 29142536 
    5. ProductControllerCore->assignCategory() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:274 0.7383 29165536 
    6. HookCore::exec() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:511 0.7383 29165696 
    7. HookCore::execWithoutCache() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:280 1.0765 30654152 
    8. HookCore::coreCallHook() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:489 1.0765 30654248 
    9. CrossSelling_Mod->hookProductFooter() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:771 1.0796 30664584 
    10. CrossSelling_Mod->getOrderProducts() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:263 1.1324 30873152 
    11. ProductCore::getProductsProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:210 1.1426 30888160 
    12. ProductCore::getProductProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php:1619 
    
    Notice: Undefined index: id_category_default in C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php on line 1676 Call Stack: 0.0005 143208 
    1. {main}() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:0 0.1757 9274480 
    2. DispatcherCore->dispatch() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:33 0.2086 12144048 
    3. ControllerCore->run() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Dispatcher.php:743 0.2870 15606568 
    4. ProductControllerCore->initContent() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\controller\Controller.php:366 0.7255 29142536 
    5. ProductControllerCore->assignCategory() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:274 0.7383 29165536 
    6. HookCore::exec() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:511 0.7383 29165696 
    7. HookCore::execWithoutCache() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:280 1.0765 30654152 
    8. HookCore::coreCallHook() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:489 1.0765 30654248 
    9. CrossSelling_Mod->hookProductFooter() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:771 1.0796 30664584 
    10. CrossSelling_Mod->getOrderProducts() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:263 1.1324 30873152 
    11. ProductCore::getProductsProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:210 1.1456 30892088 
    12. ProductCore::getProductProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php:1619 
    
    Notice: Undefined index: id_category_default in C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php on line 1676 Call Stack: 0.0005 143208 
    1. {main}() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:0 0.1757 9274480 
    2. DispatcherCore->dispatch() C:\xampp\htdocs\ps-backuplive-tb-shoply\index.php:33 0.2086 12144048 
    3. ControllerCore->run() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Dispatcher.php:743 0.2870 15606568 
    4. ProductControllerCore->initContent() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\controller\Controller.php:366 0.7255 29142536 
    5. ProductControllerCore->assignCategory() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:274 0.7383 29165536 
    6. HookCore::exec() C:\xampp\htdocs\ps-backuplive-tb-shoply\controllers\front\ProductController.php:511 0.7383 29165696 
    7. HookCore::execWithoutCache() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:280 1.0765 30654152 
    8. HookCore::coreCallHook() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:489 1.0765 30654248 
    9. CrossSelling_Mod->hookProductFooter() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Hook.php:771 1.0796 30664584 
    10. CrossSelling_Mod->getOrderProducts() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:263 1.1324 30873152 
    11. ProductCore::getProductsProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\modules\crossselling_mod\crossselling_mod.php:210 1.1487 30899640 
    12. ProductCore::getProductProperties() C:\xampp\htdocs\ps-backuplive-tb-shoply\classes\Product.php:1619
    


  • I saw in above debug log that crosselling_mod module is named. I deactivated it and all the debug error message disappear, but the page seems to be loaded as without Css 😞



  • Ehh can’t read that. Let me just rearrange the code block first 🙂

    You can wrap your code in backquotes, like so
    ```
    Code here
    ```



  • Strange, it seems like the module is supposed to pass an array with a few product properties like id_product and id_category_default, but it doesn’t do that. Is the default category missing from some of your products?



  • You can make it restore id_category_default on the fly if necessary. To do this, add the following code:

    if (!isset($row['id_category_default']) && $row['id_category_default']) {
        $row['id_category_default'] = (int) Db::getInstance()->getValue(
            (new DbQuery())
                ->select('product_shop.`id_category_default`')
                ->from('product', 'p')
                ->join(Shop::addSqlAssociation('product', 'p'))
                ->where('p.`id_product` = '.(int) $row['id_product'])
        );
        if (!$row['id_category_default']) {
            $row['id_category_default'] = Context::getContext()->shop->id_category;
        }
    }
    

    Just before line 1676: https://github.com/thirtybees/thirtybees/blob/c5edee81af45af8ed6e8894314b06e936849bbf1/classes/Product.php?utf8=✓#L1676

    Then it should restore the category ID when it’s missing



  • this does not to do the trick

    if the missing standard category is the culprit I will go through all products. ca. 250 😕



  • Micheal, according to the backoffice all products have a standard category.



  • But did you add the code?



  • yes of course. Locally and on live server.



  • Should now be a different error message then. Can you find it?



  • solved now by Mdekkers code enhancement of theme’s product rating module.


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.