yudi.sutanto Posted June 1, 2014 Share Posted June 1, 2014 98. if (is_array($product) && isset($product['id_product']))99. $product = new Product($product['id_product'], false, $id_lang, $id_shop);100. elseif ((int)$product)101. $product = new Product((int)$product, false, $id_lang, $id_shop);102. else103. throw new PrestaShopException('Invalid product vars');104. }105.106. // Set available keywords107. $params = array();108. $params['id'] = $product->id; Did anyone know how to solve this issues? This code is part of getProductLinks method. It seems that there is something to do with Database. Please help me. Link to comment Share on other sites More sharing options...
PascalVG Posted June 2, 2014 Share Posted June 2, 2014 Yudi, Can you explain a little more what goes wrong, where it goes wrong etc? Did you write some code yourself and you call the getProductLinks function yourself, or does something go wrong in the standard code? If, so, which PrestaShop version? Which page? If you wrote some code yourself, I can imagine you called the function with $product as parameter, which may be an object, instead of an array or an integer (product id is an integer). If you wrote the code yourself and $product is an object, try something like: $product->id or so... Please elaborate if this doesn't help. pascal. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now