Jump to content

Blakewilliams

Members
  • Posts

    30
  • Joined

  • Last visited

Blakewilliams's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi all I'm having some problems with my search. The site I made for my client is a health shop and is running liek a charm - http://www.selecthealthy.com I think theres some problem with the search criteria - if my search contains single numbers, then the search returns no results. For example, we have a supplement called 'omega 3'. If i search 'omega' then they all come back, but 'omega 3' returns nothing. If I go so far as to type '3' however, a few things come back with '3' in the name, for example 'st johns wort extract 333mg', but still no 'omega 3'. My first assumtion would ahve been that the search function ignores single characters in descriptions, but when I enter as a search term 'omega 3', it still returns nothing, where if my theory was correct, there would be an indiscriminate list of all of the omega's. Any ideas? Thanks for any help in advance. Blake
  2. I managed to achieve what I intended to set out - that was have multiple buy now buttons for different attribute values on the home page. I dont think that would ever work with more than 1 set of attribute values though, but I'm sure you could get some kind of reduced down version of the product page on the home-featured module. I had a little help from simonthetemp with mine, but you can have a look : www.selecthealthy.com
  3. Please excuse my English I don't speak a word of scandinavian - but I had this issue and managed to fix it and hence thought I would let you know. I have also tranalsated to swedish at the bottom. Briq had it right, there is corruption in one of the tables involved in the query, which are CUSTOMER | CONNECTION | GUEST - check all three of these for corruption, in my case there was a row on the connection table that was corrupt and harming the relation. This was caused to an unexpected server failure which must have cut the database off as it was writing. Follow the phpmyadmin repair table process for all three of these and you should find your problem. Hope this helps Blake --------------------------------------- Ursäkta min engelska jag talar inte ett ord av skandinaviskt - men jag hade detta problem och lyckats fixa det och därför tänkte att jag skulle låta dig veta. Jag har också tranalsated till svenska längst ner. Briq hade rätt, det finns korruption i ett av de tabeller som är inblandade i frågan, som är kund | KOPPLING | Guest - kontrollera alla tre av dessa för korruption, i mitt fall fanns det en rad om sambandet bordet som var korrupt och att skada relationen. Detta berodde på att en oväntad server fel som måste ha skära databasen bort som det var att skriva. Följ phpMyAdmin processen reparation tabellen för alla tre av dessa och du ska hitta ditt problem. Hoppas den här hjälper Blake
  4. Hmm - I can't remember exactly what I did - but it wasnt really a substantial error, the cart equations are correct, it just references a wrong var when it writes the PDF. I have enclosed my pdf class file so you can either use it or examine (i think this is the correct one). Let me know how you get on. ) PDF.php
  5. Fixed - after a hell of a lot of frusration and calculations, I manageed to sort it.... I can't remember what line it was on, but I simply located the relevant variables and made sure that I only applied VAT or TAX to the discounted total - NOT the original total. Still no real closure here though and not a word from an admin... I reported this to the bug tracker and it has been in the forum a while now with no real resolve.
  6. I only have one attribute group and max 3 attributes per item. How could this cause me to have any problems? Seems to work fine so far, basically the guy I am doing it for sells health supplements - for example vitamin C - this then comes in 60, 120 & 360 tab bottles. Basically, for all of its whistles and bells, I think that prestashop really fails in this respect - it has taken me a huge amount of time and effort to try to understand how it all workks and then hack pshop. We all know fickle web users can be - if you don't give a person the chance to buy something the second they see it, but rather presume that a user will be willing to navigate a number of clicks into the site until they find and obscure drop down, then you don't have to be a genius to see that conversions will be harmed. I'm quite keen to hear how other people feel about this. Either way, I am extremely thankful to Tomer and Simonthetemp for their priceless help.
  7. Progress! I declared a public function as you suggested at the bottom of the category class public function getAttributesGroups($id_lang,$id_product) { return Db::getInstance()->ExecuteS(' SELECT ag.`id_attribute_group`, agl.`name` AS group_name, agl.`public_name` AS public_group_name, a.`id_attribute`, al.`name` AS attribute_name, a.`color` AS attribute_color, pa.`id_product_attribute`, pa.`quantity`, pa.`price`, pa.`ecotax`, pa.`weight`, pa.`default_on`, pa.`reference` FROM `'._DB_PREFIX_.'product_attribute` pa LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute` 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` LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON ag.`id_attribute_group` = agl.`id_attribute_group` WHERE pa.`id_product` = '.intval($id_product).' AND al.`id_lang` = '.intval($id_lang).' AND agl.`id_lang` = '.intval($id_lang).' ORDER BY pa.`id_product_attribute`'); } Then I tidied up the function call so that it now reads for($i=0;$i $attributesGroups = $category->getAttributesGroups($cookie->id_lang,$cat_products[$i]['id_product']); // Insere le tableau des combinaison dans le tableau des produits, en associant chaque produit a son tableau de combinaisons $cat_products[$i]["combinaisons"] = $attributesGroups; } and now if i type {$product.combinaisons|print_r} in 'product-list.tpl' it returns the relevant values! its rough around the edges, but its a very good start! I now need to extract the correct values and pass them to the cart (i have already managed this on the product page, so I'm hoping that it will be rudimentarily the same)
  8. hmmm I have tried moving the function to the bottom and out of the way - still no success. I have included my modified category page... maybe you could have a look see if you could see any syntax errors? Huge thanks! category.php
  9. hmm i could see that the product variable in the category.php file was actually $cat_products, so I changed the code below so that the function worked off the $cat_products class thinking that this might work... //Boucle sur les produits pour récupérer leur déclinaisons for($i=0;$i $attributesGroups = $cat_products->getAttributesGroups($current_id_lang,$cat_products[$i]['id_product']); // Insere le tableau des combinaison dans le tableau des produits, en associant chaque produit a son tableau de combinaisons $cat_products[$i]["combinaisons"] = $attributesGroups; } No joy again though, simply won't even render the page!
  10. Hi Simon I see where you are coming from - I thought I had it for a sec.... On line 60 of category.php, I located the smarty array, then wrapped it in a bit of code from 'homedeclinaisons' so that it looked like this:: //Boucle sur les produits pour récupérer leur déclinaisons for($i=0;$i $attributesGroups = $this->getAttributesGroups($current_id_lang,$products[$i]['id_product']); // Insere le tableau des combinaison dans le tableau des produits, en associant chaque produit a son tableau de combinaisons $products[$i]["combinaisons"] = $attributesGroups; } $smarty->assign(array( 'products' => (isset($cat_products) AND $cat_products) ? $cat_products : NULL, 'id_category' => intval($category->id), 'id_category_parent' => intval($category->id_parent), 'return_category_name' => Tools::safeOutput(Category::hideCategoryPosition($category->name)), 'path' => Tools::getPath(intval($category->id), $category->name) )); // AJOUT function getAttributesGroups($id_lang,$id_product) { return Db::getInstance()->ExecuteS(' SELECT ag.`id_attribute_group`, agl.`name` AS group_name, agl.`public_name` AS public_group_name, a.`id_attribute`, al.`name` AS attribute_name, a.`color` AS attribute_color, pa.`id_product_attribute`, pa.`quantity`, pa.`price`, pa.`ecotax`, pa.`weight`, pa.`default_on`, pa.`reference` FROM `'._DB_PREFIX_.'product_attribute` pa LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute` 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` LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON ag.`id_attribute_group` = agl.`id_attribute_group` WHERE pa.`id_product` = '.intval($id_product).' AND al.`id_lang` = '.intval($id_lang).' AND agl.`id_lang` = '.intval($id_lang).' ORDER BY pa.`id_product_attribute`'); } I thought that i could then access 'combinaisons' in the product array in the product-list.tpl file, but I have had no joy. Kinda moving out of my comfort zone here so any help would be amazing! Blake
  11. I'm trying to do this - very keen to hear of anybody can help here! Blake
  12. Fabulous - as my post suggest on the other thread open for this, I have had success in integrating parts of your code into the 'homefeatured' module on the home page - every item on homefeatured now has a button for all attributes! NEXT hehe does anybody have any ideas how I could get the attributes buttons on the search result pages.... for example, the page that shows when you click one of the categories down the side, such as 'laptops' - then the category.php?id_category page results of the relevant page appear. I would ideally like to get a button for the three attributes on there too. All help is extremely greatfully recieved! Blake
  13. I need something liek this too - very greatful if someone can help!
  14. i think we're thining along the same lines - I can't understand why you would want to bring this data back, but not have a button for each. also, why in one section at the bottom?
×
×
  • Create New...