Woocommerce Conditional Logical Fields in Checkout

Case study:
You have product which is not in stock actually but you do not want to show this product as pre-order item.
What you want:
You want to show a custom message after user go through the painful checkout process.

Another Case Study:
You want to show conditional field according to product in user cart, that conditional field must not show with other product or category.

In this post you will study how to add conditional fields during checkout
Conditional logical fields on base of cart item
Conditional logical field on base of category
Conditional logical field on base of product
This method is free of cost and does not required any coding skills

Why you study this?
Because it is totally free and tested functionality you don't have to waste you money for this simpler task.

Install free plugin and activate
Go to plugin settings

download plugin

How to handle pre-order items without marking them pre-order?
First go to checkout manager

Step 1

go to checkout manager

Step 2
Add new field under additional tab

go to additional tab

Step 3
Changing placeholder
Chose select option

enter placeholder text

Step 4

go to more toggler to complete

Step 5

enter option text

Step 6

text to show on front-end

Step 7

conditional field

Step 8

Logical fields

Press save changes before leaving to copy category slug
How to get category slug and product slug?
How it works?

Category slug

add category slug

Step 2

quick edit to access slug

Step 3
copy slug and paste to above step 8 screen

show slug to copy

How to get product ID?
Go to product > all products

Step 1
Take mouse over any product

get product id

Copy that ID and paste into step 8 field
Note: if you marking category slug than no need to mark individual product just add product to the category in this case I have created most recent category so every product in this category will show the message during checkout process.

How it can be use?
Very simple, you don’t want to show the pre-order button, no prob, just assign those products to the most recent category when customer add any product to cart from selected category, user must see the conditional checkout field so user should notify the delaying in process, when user select a product which are not belonging to the most recent category user will simply get through the checkout process without notifying any conditional field.

How it will show in checkout page?

conditional logic in checkout

logical checkout field on cart item base

Make it required

required checkout conditional field

front view of logical field

error when user do not fill conditional field

Limitation:
If user select one item with conditional logical field and one without conditional logical field in cart, the conditional field must show in checkout.

Another Limitation:
The user will not know that, which item was conditional and which item was not.






Comments

Popular posts from this blog

Magento2 Installation – Getting Started