Jump to content

Caroline W

Members
  • Posts

    6
  • Joined

  • Last visited

Contact Methods

  • Skype
    caroline.interspace

Profile Information

  • Location
    Nyköping, Sweden
  • Activity
    Web development agency

Recent Profile Visitors

417 profile views

Caroline W's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I've read through the thread and solutions suggested. From what I understand there used to be a checkbox where you could exclude certain products, is this right? (I've only personally worked with 1.5.6) Can anyone explain why it was removed? I guess if you pick all products and then remove the ones you don't want to be discounted that's the same as a checkbox to exclude. However if you pick a category and then want to exclude products you have a problem. Is there a quick solution for that? Or do I have to create a temp category for this?
  2. Thanks for the reply @vekia. Well, this is the thing... I got the impression that it might be possible to either select product(s) from the Conditions tab so in effect the shopowner decides the products to put the discount on or the customer can choose (leaving the Product selection empty - which is what I did and probably why it's behaving in the way it does). As I was hoping this would lead to the effect that a customer can choose any product they want to use the discount on, on the cart page somehow. Based on your reply however, and playing around with 1.6 (where you have to select product(s) in the Conditions tab to be able to use the action option Selected products) I'm beginning to understand that what I'm trying to do won't work. At least not that way. So I'll tell you what I'm trying to accomplish and maybe you are able to give me a solution based on that rather? I want to create a voucher for customers with a code (not automatic) that gives them 10% off any product of their choice. They should only be able to use it on that one product however. See, my understanding is that if I put a range of products in the Conditions tab - when the client use the code they will get 10% on ALL the products in the cart that match the criteria in the Conditions tab. I want something along the line of the radio button option: "Apply discount on cheapest product" - but it shouldn't be the cheapest but the product the customer choose. I hope my rambling make sense. Maybe you can see a simple solution, or a workaround. Even just confirming how I suspect the cart rule system works in this regards would be a help so I don't spend more time on the impossible. Many thanks!
  3. When creating a voucher, there's an option in the Cart rule Action tab to apply a discount to Selected Product(s). In the documentation this option is described as: Selected product(s). The customer can choose on which products the discount should be applied. Only available for the "Percent (%)" option. This is what I want, I have set a 10% discount and want the customer to be able to apply this to a chosen product. I'm not getting this to work however, when applying the discount to my cart - nothing happens. When trying to reapply it it's telling me it's already been used in the cart. I've tried switching to the default theme, but same result. Theme I'm using is Leomobi and Prestashop 1.5.6.1
  4. I have a function in a php file (for a module) that looks like this: //Function to get all available combinations from the DB //Returns an array with combination info public function getAllProductCombinations(){ //Get all DB info for available combinations $result = Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'attribute_lang` a LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination`p ON (p.`product_attribute_combination.id_attribute` = a.`id_attribute`) LEFT JOIN `'._DB_PREFIX_.'stock_available`s ON (p.`id_product_attribute` = s.`id_product_attribute`) WHERE a.`quantity` >= 1 AND a.`id_lang` = 1 ORDER BY `id_product` '); //Create an array for the comb data $combinations = array(); foreach ($result as $row) { $combinations[$product->id] = $result; } return $combinations; } Now I need this result to be accessible in the tpl file. I have tried different approaches to assign it to smarty, but it's not working. I have tried assigning it in the function after return $combinations; like; $smarty->assign('combinations', $combinations); I have also tried adding "return $this->display(__FILE__, 'product.tpl'); " or $this->context->smarty->assign. The $combinations variable comes back empty in the tpl file. How can I get this result to use in my template file (part of a module)? PS v 1.5.6.1
  5. I am trying to accomplish the following: On the product list pages, when a product is being hovered another template (a module) is called displaying thumb versions of all images. I want to add all available product combinations as a list next to the images. I used the code found in this thread (http://www.prestashop.com/forums/topic/279551-how-to-show-product-attribute-option-in-product-list/?p=1518229). I have copied the function to the modules controller file, but I'm missing something cause nothing shows up. There's nothing wrong with the code itself as I can foreach the combinations from the product-list template (with the function in the CategoryController file.) This works fine. I need this code to work in another class (a module class) What am I missing? Does the variables need to be assigned differently? Again? Needless to say, I guess, I'm new to PrestaShop, php classes and smarty. I've also tried with an sql query (which works fine in the Sql Manager) and edited it according to Presta coding standards, but not able to access the result. Can anyone give me a helping hand?
  6. I've used this code successfully on the product-list template + CategoryController file. I now need to move it into a module for the theme on the site. One of the things I tried was to use the same code as I successfully got working in the category view, by posting the 2 functions in the controller file for the module (extended from modulecontroller) and the foreach loop in the template file for the module. But nothing happens... What am I missing? I would really appreciate some pointers to get this working.
×
×
  • Create New...