Woocommerce Subscriptions and synced force sell doesn't work? - wordpress

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/

Related

Is it possible (error?) that woocommerce automatically deletes a product from an old order?

I deleted products from the shop and emptied the trash (not me, but the automatic function in woocommerce). Then products DISAPPEARED from some orders! Not all products, only 1-1 products were deleted by the system from some orders.
These are old orders, but the time between the order and execution is long, so the order data is needed for a long time. These are not yet fulfilled orders, they are in custom status.
Fortunately, I have regular backups, so I was able to view the original state and put the product back again.
BUT I have a lot of orders and now I'm afraid that the phenomenon will happen again.
Have you ever heard of this? Is there such a built-in feature in woocommerce?
I looked for similar cases online, but couldn't find any. I hope someone knows what caused this to me.

WooCommerce Order Doesn't Exist

In the last couple of days I found two orders that are missing from WooCommerce but were processed and approved by Authorize.net including full order details plus Customer Billing Information. Although an order number is included in the Aauthorize.net information, it does not exist in WooCommerce.
What can we do to pinpoint the issue? We have thousands of orders but so far only two are missing. There are orders before and after the missing ones and I'm not running any custom code or plugins that run after checkout.

Order creation adds unwanted shipping bucket

The case is following, we have a basket on which we have set only one shipping method, and which at point before order creation contains only one shipping bucket, with shipping method named "pickup".
There are 3 products in cart, two normally added products and one free gift which is added automatically with basket calculation.
This state is in pictured here:
After the order creation process (chain handlers for order creation are enabled), order contains two shipping buckets, one containing application default delivery method which is named "delivery", this is wrong and we don't want that to happen but don't know how to control it. One shipping bucket contains free gift and other contains other products. This state is displayed here:
How can we prevent having another shipping bucket being created for free gift?
EDIT: Intershop version is 7.10.15.3
I am unable to reproduce the problem on 7.10.15.2 with the standard demo shop. It is hard to say if this is a bug or a configuration problem. Can you try to reproduce this issue on an inspired demo shop?
Make sure the free gift item has the same shipping address (on line item level), shipping method and is in the same freight class as the other products.
If the problem is in the OrderCreationChain then have a look at the handlers.
Using this dev tool (only for development env)
/INTERSHOP/web/WFS/inSPIRED-inTRONICS-Site/en_US/-/USD/InspectHandlerChains-Start
There must then be a handler in that chain that creates this second bucket. Hope this helps in finding the problem.

Woocommerce checkout process creating new order at payment

I'm having a problem with WordPress/Woocommerce creating a second order for customers. This is leading to a couple issues that I'll outline below. Here is the process I am following:
Create and populate new Woocommerce Subscription object
Create new renewal order (this will be ID 1033 below) and send invoice to customer
Customer logs in and finds the pending order in My Account page
Customer opens the pending order and it is populated with the correct products and price. Customer pays the correct amount
After payment, customer is on the receipt screen but it is for a new order. The old order is still sitting on their account as pending.
After looking at the access log, I can see this:
Here is the entry link (pre-payment): /checkout/order-pay/1033
And here is the review link (post-payment): /checkout/order-received/1055
The problems I am encountering are:
I have tested completing payments more than dozen times and was only able to replicate it the first time. I have followed those same steps as much as possible to no avail (all other transactions are processing as expected without creating extra orders)
The initial order is connected to a subscription, and upon completed payment the subscription is set to automatic payments. This issue of having a new order is detaching it, and automatic payments cannot be enabled until after the next payment is processed (a month later), and will rely on the customer manually submitting the order again.
Does anyone have any idea why WordPress/Woocommerce is creating a second order upon payment.
I was having the same issue with renewal payments getting applied to a new order. In my case, I was consistently having this issue with manually added subscriptions, as well as with imported subscriptions.
After working with Woocommerce Subscriptions Support, they came out with an update (version 2.1.0) solving the issue for me. Their change log references the fix.
Fix: Do not create new orders when processing a renewal and resubscribe payment with different details to the original order by ensuring the cart hash used by WooCommerce is updated when creating the order. (PR#1687)
Try updating Woocommerce Subscriptions to version 2.1.0.

Best Way to Pass variable to Woocommerce Product?

Here is the setup.
Customer fills out form of information for product specifications. This creates an entry in the db with a unique detailsID.
They then are taken to a product page, with many variables. They select the variable product and checkout.
Now in the db they have an order as well as a separate table with the details of their request.
What is the best way to connect the product they bought with the detailsID?
I would like to basically pass the detailsID to the product page, then add this detailsID to the product. Or add the orderID back into the details table.
I keep going around whether to add this as meta data, or use a session, or just do post order logic to add the order ID back into the details table.
I really just need to link the two once the order completes but am not sure the best method to do this. I am pretty new to Woocommerce so don't know a lot of the hooks yet.
Thank you so much for your suggestions!
After a lot of research and experimenting here is the method I have decided on. This seems to add the information in a variety of places to make it easy to track orders and to insure that the customer is getting the customized product they want.
add custom data to woocommerce
I am using this method very close to how it is spelled out in this great article. This was really helpful for me being a woocommerce newb.

Resources