univers3
Members-
Posts
18 -
Joined
-
Last visited
Profile Information
-
Location
Italy
-
Activity
Agency
univers3's Achievements
-
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.
-
[TIP] Creating cart rule programmatically
univers3 replied to Stéphane1405's topic in Core developers
From the bottom of my heart: I love you stranger. -
State Select Dropdown Problem For Mobile Navigator Prestashop 1.6
univers3 replied to Miguel_SV's topic in Bug reports
Same Here! Any solution? -
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
-
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
-
Crazy problem with a Gift and Shipping calculation
univers3 replied to univers3's topic in OUT - 1.6.0.11 [7 Jan 2015]
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 -
Crazy problem with a Gift and Shipping calculation
univers3 replied to univers3's topic in OUT - 1.6.0.11 [7 Jan 2015]
up -
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?
-
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?
-
Bug when scrolling my shop on a mobile device
univers3 replied to univers3's topic in OUT - 1.6.0.11 [7 Jan 2015]
Someone have the solution please? This bug is very problematic to my mobile users -
Bug when scrolling my shop on a mobile device
univers3 replied to univers3's topic in OUT - 1.6.0.11 [7 Jan 2015]
Nothing, The problem is still there. Any other suggestion to fix this awful bug? Thank you very much