Woocommerce 2 items in the cart = price x - wordpress

I would like to add conditional pricing to the woocommerce cart.
I have business card products priced at 65.00 for 250 and 85 for 500. I would like it so when a user adds two product items in the cart at the individual price of 65.00 the cart total is not 130 but rather a value I specify.
I know some of the woothemes plugins could do this but I don't want to pay as I know somewhere out there is a simple enough solution.
Any help much appreciated.
Thanks

You can just create a woocommerce coupon in Wordpress that will discount the desired products(s)/cart total by a specific percentage amount.
You can set various "Usage Restriction" settings that will make the coupon only be applicable under certain circumstances (such as minimum spend, products, expiration date). Users can then be provided with a a coupon code to enter at the cart checkout.
This will be the easiest and fastest the solution that doesn't involve creating code for Dynamic Pricing.
The following link will help you to set up a Coupon:
WooCommerce 101 Coupons
For more specific pricing needs you will have to create a function that hooks into the Woocommerce shopping cart in the functions.php file. The logic for the function should be something like this:
Get the cart contents.
Check that the number of items in the cart are equal to 2 (or more if you want).
if $cart_count == 2 then $cart_total - $x_amount.
This Question will help you understand how to write a simple function to achieve this.
Best of luck! :)

Related

Woocommerce Shipping Calculation Logic

The plot:
I am working with a Dropshipping company that has an API for providing products, the shipping is calculated this way:
Every product comes with a shipping size ( S,M,L ... ) and for each country this sizes have different fixed prices. I am saving this shipping size in a custom meta.
Example:
France
Size M: 10$
Size L: 15$
Spain
Size M: 15$
Size L: 20$
The problem:
I cannot seem to figure out a way of implementing this into woocommerce. I see that I can setup a flat rate for each country but I cannot implement these different sizes.
If this is not possible with plain Woocommerce, I want to implement something myself with php or I am also open to any official/verified Add-ons.
I figured out this on my own - so apparently I can make a shipping class for each of those sizes ( S, M, L ) and then I can setup Flat Rates by country and shipping class. This was very easy after all, no custom code required.
insert by location rules with multiple locations you can place fees for each location. A different rate can be configured in woocommerce and can also be configured by postal code
You can also use the plugin for handling all this stuff. I figured out this plugin maybe it can help you out. Advanced Flat Rate Shipping Method WooCommerce.
In this plugin you can create your own rules.

Woocommerce Subscriptions and synced force sell doesn't work?

I'm trying to create a situation in which a guarantee (no VAT) is automatically added to the cart when you order a variable subscription product. This should be done only one with the first transaction, not with the next payment in the subscription, therefore a grouped product construction.
I try to do this with the plugins mentioned above, but it simply doesn't appear in the shopping cart.
Any idea why and how to fix it?
For the grouped product, see also: https://www.rentyourmac.com/product/the-master-macbook-test-subscription/

Add product variation with subscription plan in woocommerce

I want to add product variation in such a way that , On product details page , user will see 2 types of plan LIKE Single & Subscription.
In single plan , user can buy a single bottle and proceed.
In subscription , we provide say 3 bottles together with some reduced price and also allow user to continue subscription for 1 year or for unlimited time.
So that when he buys subscription in background , will have to do renewal of subscription and also automatic payment.
so back to my questions , like its easy to add variations like different colour and sizes.. but how to achieve in my above case.
I have also bought WooCommerce Subscription plugin.
I am very new to wordpress , so need some guidelines , is this possible or not , if yes what approach should i take? can we add variations like single and subscription for the same product.
Thanks in advance.

Adding fees for paypal and credit card depends on customer geo zone

I have found this - WooCommerce: Add fees to card based on payment gateway selected nice plugin, but I would need a plugin that I can set up three different fees to customers from different geo zones..
For example. - Slovenia - 4.8% - Serbia - 4.9% ect..
How can I do that? With which plugin?
Or is it possible to modify upper plugin to add geo zones for each fee? I am not good at coding, so I do appreciate some help.
#Marin Atanasov - I can't, because this is not tax, it's fee and it's not acceptable for our inspection. I already had that tax created in paypal, but it's not ok, because I have three different webstores, one in OC, one in woocommerce, and one in shopmania. I found one extension for OC that already calculates my fee for slovenian users, so I removed tax (so called fee) for them in paypal, but than the webshop in shopmania targets costumers in ex yugoslavia. But, the OC shop also does not exclude ex yugoslavian costumers, so the fee can be charged twice. The problem is also with the third webshop - woocommerce- where I have now for all costumers set up 3.4% fee, but if the costumer from ex yugoslavia orders than the fee is again charged twice, because I didn't remove it from tax in paypal. I need to find a resolution so the all three webshops have their own extension to calculate the fee, and delete taxes that I already set up in paypal.
If paypal would allow multiple webstores under 1 company name, this would be easy to fix.. but I can not enter my credit card number for all three webstores.. :(
Do you have any idea what to do? I am lost.
Perhaps you can use the built-in taxes? They provide you with the option to specify custom tax rates for countries.
To do this, you would have to:
Create your custom tax rates for the preferred tax class under WooCommerce -> Settings -> Tax
Select your preferred tax class for each of the products, and make each product Taxable
Make sure the taxes are enabled and properly configured per your preferences in WooCommerce -> Settings -> Tax
You can also use one plugin to add commission to certain payment gateways with different percentages
Payment Gateway Based Fees and Discounts for WooCommerce

How to change price based on number of attributes?

I am using Woocommerce with WordPress. How do I calculate pricing based on number of attributes selected as shown in the image. E.g. the current order should amount to Rs. 9100 as there are 9 attributes priced at Rs. 1000 each and Rs. 100 for the product base price.
Overall quantity for the product always is one.
I was able to solve the problem by using Gravity forms and Gravity forms addon for woocommerce.
Next I created added multiple product fields which automatically come with quantity field and finished with the total field.
Next I created a product with and integrated it with gravity form I just created.. voila..
Edit: if you guys have any other creative of doing this. Please answer below.
You need to setup product attributes and connect variations so 1 product can have multiple options which all influence the price. It is explained here:
http://wcdocs.woothemes.com/user-guide/product-variations/

Resources