Jump to content

univers3

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by univers3

  1. Yeah you understood the problem! And you are right too! After setting the $coupon->cart_rule_restriction to 1 the new CartRule will be incompatible with any other existing cart rule in the shop. Thank you very much Rocky!
  2. Hi there, I have just made a script to create a new CartRule programmatically. The problem is that I don't know how to make it incompatible to all the existing ones. This is mi script: $coupon = new CartRule(); //put here the coupon name + translations //ex: if your website is in french (id language = 1) and english (id language = 2) $coupon->name = array(1=>"Voucher ".$_GET['valore']."€",2=>"Voucher ".$_GET['valore']."€"); //by default cart rule is valid for one client that can use it one time //validity $coupon->date_from = "2015-08-20"; $coupon->date_to = "2019-08-21"; //Make a random code $exist = true; while ($exist){ $coupon->code = strtoupper("FNZ-".Tools::passwdGen(5)); $exist = $coupon->cartRuleExists($coupon->code); } //Partial Use $coupon->partial_use = 0; $coupon->reduction_tax = 1; //set value of voucher $coupon->reduction_amount = $_GET['valore']; //conditions //ex: rule only applies if the order is 100 or more including taxes and exluding shipping //$coupon->minimum_amount = 100; //$coupon->minimum_amount_tax = 1; //$coupon->minimum_amount_currency = 1; //$coupon->minimum_amount_shipping = 0; //this creates the coupon $coupon->add(); The only function in the CartRule class that seems interesting is: public static function copyConditions($id_cart_rule_source, $id_cart_rule_destination) The problem is that will copy only the existing conditions of another CartRule, if in future I will add more Vouchers they will not incompatibles. Anyone can help me o have the solution to make a CartRule incompatible with ALL EXISTING cart rules? Thank you very much.
  3. First of all Thanks for that answer. You saved me a lot of time. I have a question: If i want to put the track on the paypal page "Submit" what scripts I have to modify? /prestashop/modules/paypal/views/templates/front/order-confirmation-mobile.tpl and /prestashop/modules/paypal/views/templates/front/order-confirmation.tpl Right? or other pages too? Thanks
  4. Hi all, Some of my costumers find not very clear the possibility of choice a color only by the color picker. So i'm interested to add a dropdown menu with the names of the colors. Is it possible? Like this image: Is there a module or something to do this? Thanks
  5. When I inserted the Code of the Voucher and removed it, the cart rule begun to work properly!!! So it's seems to be a bug of Prestashop. SOLUTION (Workaround): - Add the cart rule as you want - Add the code of the cart rule - Remove it
  6. Hi, thank you for your reply! Your solution works, but I don't need the gift working in that way. I need that the gift is "pushed" automatically in the cart of the customer! BUT When I inserted the Code of the Voucher and removed it, the cart rule begun to work properly!!! So it's seems to be a bug of Prestashop. SOLUTION (Workaround): - Add the cart rule as you want - Add the code of the cart rule - Remove it
  7. Hi all, Here is my situation: - Shipping fee: 2.99€ Free when the cart is bigger than 39€ I have a Gift for the first order of any customer that normally cost 3€ So with the Cart Rules I have simply set that the Gift must to be added automatically when a customer add 1€ or more in cart. The problem is that: Prestashop continue to see the Gift as a paid product! So when the user can obtain the Free Shipping creating a cart only of 36€ ( + the price of the gift = 39€) Is there a way to apply the rule BEFORE the shipping calculation?
  8. Hi all, Here is my situation: - Shipping fee: 2.99€ Free when the cart is bigger than 39€ I have a Gift for the first order of any customer that normally cost 3€ So with the Cart Rules I have simply set that the Gift must to be added automatically when a customer add 1€ or more in cart. The problem is that: Prestashop continue to see the Gift as a paid product! So when the user can obtain the Free Shipping creating a cart only of 36€ ( + the price of the gift = 39€) Is there a way to apply the rule BEFORE the shipping calculation?
  9. Someone have the solution please? This bug is very problematic to my mobile users
  10. Nothing, The problem is still there. Any other suggestion to fix this awful bug? Thank you very much
  11. Hi, Thank you very much for this fix. I have tried to add this code in some css files but with no results. Please, can I know the exact place to put this code? Thank you very much.
  12. Hi, I have just installed the new prestashop with the default theme. After some days I have decided to try it on a mobile device but i encountered a problem: when scrolling if the action start on a menu it will activate it and the scroll have no effect. Please see the attached video to understand what i'm trying to say. Someone had the same problem? Or know a fix? Thank you all. Video of the Problem
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More