Adding an action to Magento shopping cart price rules - php

I am looking to remove tax based on a product's selected custom option.
I want to have regular tax rules in place for my products. If, however, a visitor chooses option x from one of the custom options, then tax should not be applied.
I have considered using configurable products for this where the simple product representing the tax free option would not have taxes, but magento calculates taxes based on the parent product for configurable products.
Given this article, I can create custom rules that apply to a products' 'sku-modifier'. Meaning I can add a sku modifier for the custom option, then create a shopping cart rule that has a condition containing that sku-modifier.
The only part left is to create an action that would eliminate tax. I can't simply add a discount that is the same amount as my tax rate since the tax rate varies by region.
I have poked around in \app\code\core\Mage\Rule\Model\Action\Abstract.php but I'm not sure how to go about adding the code that would enable this functionality. Any help would be appreciated.
Thanks.

Related

Prestashop display/hide carrier based on cart rule

I'm using Prestashop 1.6.1.18. I want to set up a cart rule to offer a carrier for purchases over 14 products with the same kind of attribute (grams of pigment: 2 grams). I want to display or hide this carrier on the cart page based on this cart rule.
I have created a cart rule, but I cannot do someting like this on the Actions tab.
How do I resolve this? Is there a module for this? or else, how should I modify the code, just to hide/display the carrier based on the cart rule?
Why hide a carrier, even if you offer it based on a cart rule, your customer must chose a carrier to be delivred.

How can I add a checkbox on a product page in WooCommerce that adds a fixed fee when checked?

Here is the trouble I'm having. I'm creating a custom kitchen cabinet doors and drawers website with Woocommerce. There are a lot of variations going into the project that alters the price (Wood type, thickness etc.) per square foot. The customer also has to provide credentials (L x W) to calculate the total cost of the product. We found that using the Measurement Price Calculator plugin works the best as it also calculated the weight of the product which can be used for shipping.
However, we want to add an option (preferably checkbox) that adds a fixed fee to the product if checked. Using WooCommerce itself and having "Boring" as a variable attribute doesn't work because adding a charge here will only add to the price per square foot and will not be fixed regardless of the dimensions.
I'm not a master at PHP and have only found ways to add a surcharge in the checkout but I need the fee to be conditional to the checkbox being checked and be replicated based on quantity. If there are any functions or hooks that you think could help me please let me know.
What you are looking for is a part of WooCommerce that was separated and turned into a paid plugin called WooCommerce Product Add-Ons.
Koda

magento coupon code for free shipping

I need to generate coupon code which allow customer "Free Shipping". I have generated one with following options:
Promotions -> Shopping Cart Price Rules
All Customer Groups
Specific Coupon
Coupon Code
no condition
Free Shipping - For matching items only
I am getting all shipping methods with price $0 where I want Free Shipping option included with all shipping method with their actual price. There is setting in System -> Configuration, free shipping is available for price > 100, but I want to give free shipping option to some customers using coupon. I am getting following options:
Any suggestions?
This is the way Magento rules generally work.
To implement this change, you need to either write your own extension or get a ready-to-use solution.
E.g. our Magento shipping extension is capable of doing that: http://www.mageworx.com/shipping-suite-magento-extension.html

Magento same product with multiple source costs various vendors but with same sale price?

In my magento shop, the same products will have a slightly different cost based on some cases but I sell the same price.
Question: how do i set up my product so it has multiple source costs?
Idea Question: Is there any way I can fill in the products cost after people placed an order, also including the amount and the provider's name.
What you do is set up Tier Pricing and Customer Groups, so that you have a different price structure since thats what your wanting. To add a price later would be maybe something something like using an observer class Magento : how to change item price when adding it into the cart

applying VAT Rule in magento

when i started on magento i use to list items including VAT as i am not VAT register. but now i have automated my price and data from a data supply company. and they send prices exclude VAT so i needed a rule to add 20% VAT on top of them.
i have created a rule as told here: http://www.magentocommerce.com/knowledge-base/entry/setting-up-value-added-tax-vat
and gave it Name "Standard VAT" but the problem is my magento is using attribute for tax "Taxable" and not using "VAT Standard"
can you tell me how to make magento use this rule by default? and show the prices include VAT on front end, every where.
there is a solution to select all the item in catalog and edit attribute and select "Standard VAT" but that is not fault proof. we edit new items every day and wont find a out which product is showing VAT and which isnt.
another thing i have done is: changed the setting in "taxable" attribute. but it is still not showing VAT on front end. i have tried to give priority to "standard VAT2 but no use.
you help will be much appreciated. please tell every thing in little details.
Once you have setup your Product Tax Rules which will have all the countries and rates you want to apply assigned to your Standard VAT Product VAT class, you will then to change each product to use this tax class. Go into the product, select prices, and change the VAT class to Standard VAT. Providing your rules are all setup correctly and you have set in the system configuration that your product prices are now setup as excluding tax, then it will automatically apply your tax rules to the products on the frontend.
I am unaware of a Default System Configuration Option for product tax_class_id. Ultimately it is simply an EAV attribute like any other custom product attribute. My deployment always defaults to the first product tax class after None when setting up a new product. What you could do is go into the database manually and set the default value of the tax_class_id attribute to be the ID of the product tax class you want to default to. Something like the following would probably do it;
UPDATE `eav_attribute` SET `default_value` = '2' WHERE `eav_attribute`.`attribute_code`='tax_class_id';

Categories