Jump to content

Nákupní seznam do souboru product-list.php


pavell86

Recommended Posts

Dobrý den, mám plugin na nákupní seznam. Nákupní seznam se mi zobrazuje na stránce produktu a já bych ho potřeboval zobrazovat i u jednotlivých produktu v kategorii. Mohl by mi prosím někdo poradit jak na to?

 

Hook pro zobrazení na stránce u produktu uvádím níže

public function hookDisplayRightColumnProduct() {
        if($this->context->customer->isLogged()) {
            $this->createDefaultShoppingListIfNotExist();
            
            $customer = $this->context->cookie->id_customer;
            $shoppingListObj = new ShoppingListObject();
            $shoppingList = $shoppingListObj->getByIdCustomer($customer);
            
            $product = new Product(Tools::getValue('id_product'));

            $this->context->smarty->assign('title', $product->name[1]);
            $this->context->smarty->assign('shoppingList', $shoppingList);
            return $this->display(__FILE__, 'views/templates/hook/product.tpl');
        }
    }

Děkuji

Edited by pavell86 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...