Vasiu.simi Posted December 6, 2017 Share Posted December 6, 2017 Salutare, proaspat pe presta 1.7 si am dat de o dificultate legata de combinatii... le genereaza dar pe site nu functioneaza, odata selectat un atribut, se intoarce la cel de baza fara nici-o schimbare. Nu prea inteleg care af fi motivul si am venit sa cer ajutor... Versiunea de Prestashop: 1.7.2.4, si apropo, generatorul de combinatii de pe 1.6 mi se pare mult mai simplu sau doar mi se pare? Link to comment Share on other sites More sharing options...
Marius05 Posted December 6, 2017 Share Posted December 6, 2017 Te referi la selectarea atributului la filtrarea produselor, sau in pagina produsului? Link to comment Share on other sites More sharing options...
Vasiu.simi Posted December 6, 2017 Author Share Posted December 6, 2017 Multumesc pentru raspuns, ma refer la selectarea atributului... Totusi ca sa fiu mai explicit si sa nu gresec, produsul este un laptop si i-am adaugat la combinatii, cateva atribute Primul fiind standard, al doilea +4GB RAM ( am setat valoarea la +100 lei ), apoi + 8 gb Ram... ( +200) Am lucrat pe prestashop 1.6 si fac acelas lucru si aici dar pur si simplu cand selectez de ex +4gb ram, nu se intampla nimic, defapt se intoarce la valoarea standard... Sper ca am fost cat de cat explicit, imi este greu sa vorbesc in termeni pe care nu ii cunosc foarte bine.... Link to comment Share on other sites More sharing options...
Marius05 Posted December 6, 2017 Share Posted December 6, 2017 Ai indexat valorile in blocklayered? Ai acolo niste linkuri pe care sa dai click Link to comment Share on other sites More sharing options...
Vasiu.simi Posted December 6, 2017 Author Share Posted December 6, 2017 (edited) Ti-am trimis un PM, poate ai timp 5 minute sa intri sa vezi pentru ca sunt blocat... Marius este putin ocupat, altcineva imi poate oferi o mana de ajutor ? Edited December 7, 2017 by Vasiu.simi (see edit history) Link to comment Share on other sites More sharing options...
Vasiu.simi Posted December 7, 2017 Author Share Posted December 7, 2017 Poate mai sunt situatii. Rezolvarea : controllers/front/ProductController.php Cautam : public function canonicalRedirection($canonical_url = '') { if (Validate::isLoadedObject($this->product)) { if (!$this->product->hasCombinations()) { unset($_GET['id_product_attribute']); } else if (!Tools::getValue('id_product_attribute') || Tools::getValue('rewrite') !== $this->product->link_rewrite) { $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id); } $id_product_attribute = $this->getIdProductAttribute(); parent::canonicalRedirection($this->context->link->getProductLink( $this->product, null, null, null, null, null, $id_product_attribute )); } } Inlocuim cu : public function canonicalRedirection($canonical_url = '') { if (Validate::isLoadedObject($this->product)) { $check = Product::getDefaultAttribute($this->product->id); // Does it have any attributes / combinations? if($check === 0) { unset($_GET['id_product_attribute']); } else { // id_product_attribute will be set in the url if(!isset($_GET['id_product_attribute'])) { // if not set in url, get the default value $_GET['id_product_attribute'] = Product::getDefaultAttribute($this->product->id); } } $id_product_attribute = $this->getIdProductAttribute(); parent::canonicalRedirection($this->context->link->getProductLink( $this->product, null, null, null, null, null, $id_product_attribute )); } } 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