fbpx
Category - Cart - Booster for WooCommerce

Category – Cart

[wcj_cart_function] #

Overview

This shortcode fetched data using the WooCommerce class WC_Cart. To be precise, it returns the value as per the function called and arguments used in the shortcode syntax. 

Cart session data, items list, coupon details, coupon count, removed cart items information, discounts, discounts after taxes, shipping data, fees on cart, cart total, cart tax, cart weight, and other such details can be fetched and displayed using this shortcode on any shop page. 

Possible Usage

  • Fetch any cart-related information to show throughout your shop or on particular page(s).
  • Show cart items on the My Account or Shop page.
  • Display the coupons applied on the cart on your shop page. It will help buyers compare coupon offers on the go and use the best coupon(s) on their purchases. It can improve your sales and assure a better store experience.

Args: 

You may use any of the shortcodes common args with this shortcode.

Syntax:

[wcj_cart_function function_name=”fn1″ arg1=”value1″ arg2=”value2″]

Here –

  • “fn1” needs to be replaced by the name of a function from the WC_cart as you need.
  • Replace “arg1”, “arg2”, etc. with the name of attributes and specify their respective values instead of the “value1”, “value2”, etc.

Input Example:

[wcj_cart_function function_name=”get_cart_contents_count” before=”Cart contents count: “]

The output should display the total number of items present in the cart alongside a prefix as added to the above input. You may always visit this page to see what a function does, or to find out which function will be useful to you.

Output:

[wcj_cart_tax] #

Overview

Use the [wcj_cart_tax] shortcode to display cart tax on any web page in your WooCommerce store. It calculates the total tax applicable on the buyer’s cart and displays it.

Possible Usage

  • On the checkout page at the top for highlighting the taxes.
  • On the shop page or on the account page so that customers could see it without opening the cart or checkout page.
  • On your single product pages if you prefer.
  • On other shop or non-shop pages of your website. 

Args: 

Use shortcode common attributes to control visibility, prefix, or postfix of the [wcj_cart_tax] shortcode.

Examples:

  1. [wcj_cart_tax before=”Cart tax: “]

Using the “Before” attribute should append a prefix to the Tax amount.

Input:

Output:

  1. [wcj_cart_tax before=”Cart tax: ” after=” is the tax amount.” location=”IN”]

Overview

This input should add a prefix and a suffix phrase to the tax amount on any page in your shop. Using the Location attribute, you may set the visibility of this shortcode’s data by country. For example, in the current context, the output will only be displayed when the user’s country is India, i.e. IN (country’s 2-letter shortcode).

Syntax:

[wcj_cart_tax arg1=“value1” arg_1=“value_1” … arg_n=“value_n”]

Input:

Let’s add it to a single product page’s description. (For the location India)

Output:

[wcj_cart_subtotal_tax] #

Overview

This shortcode displays the total tax on the current cart subtotal on the customer’s account. It can be displayed on any shop page, e.g. single, product, archive, account, etc. 

Args:

Use the common Booster shortcode args to display a prefix or suffix, or to control the shortcode’s visibility by user role, WooCommemece page type, location, or WPML language.

Example Input #1:

[wcj_cart_subtotal_tax before=”Cart subtotal tax: “]

Output #1:

Example #2

[wcj_cart_subtotal] #

Overview

If you want to display the cart subtotal in your WooCommerce store, use the shortcode [wcj_cart_subtotal]. With it, you may use the following arguments:

Args:

  • before = To add a prefix to the cart subtotal value;

Syntax: [wcj_cart_subtotal before=”Cart Subtotal: “]

Description: It will add a suffix text “is the cart subtotal.” to the shortcode’s value.

  • after = To add text after the cart subtotal value;

Syntax: [wcj_cart_subtotal after=”is the cart subtotal.”]

Description: It will add a suffix text “is the cart subtotal.” to the shortcode’s value.

  • visibility = To allow certain user roles (including custom roles) to see the shortcode’s value.

Syntax: [wcj_cart_subtotal visibility=”customer, administrator”]

Description: This shortcode syntax will make the cart subtotal to the user roles “customer” and “administrator” only.

  • location = To show the shortcode’s value in particular countries using 2 character long country codes.

Syntax: [wcj_cart_subtotal location=”IN”]

Description: The cart subtotal will only be visible to customers in India.

  • site_visibility = Set its value as “single”, “page”, or “archive” in order to make it limit its scope.

Syntax: [wcj_cart_subtotal site_visibility=”single”]

Description: The shortcode’s value will only be visible when it’s on a ‘single’ (WooCommerce Product Single) page.

  • wpml_language = Add the 2-characters WPML language list or a comma-separated list for this parameter to make the cart subtotal visible for particular languages only.

Syntax: [wcj_cart_subtotal wpml_language=”EN, HI”]

Description: The shortcode’s value will only be visible to the customers with their language set as English or Hindi.

  • not_wpml_language = Add the 2-characters WPML language list or a comma-separated list for this parameter to make the cart subtotal invisible for particular languages only.

Syntax: [wcj_cart_subtotal wpml_language=”EN, HI”]

Description: Customers with their language in the store as English or Hindi will not be able to view cart subtotal.

Input and Output:

[wcj_cart_shipping_tax] #

Overview

Add the shipping tax’s value to any WooCommerce page using the [wcj_cart_shipping_tax] shortcode. As this value is generally included in the total tax amount, your customers cannot view it directly. However, by letting them know about shipping taxes, you will make them feel more informed and relieved about the amount they are paying for the purchase.

Args

You may use any Booster Common Attribute (from the All Shortcodes section) with it.

Possible Usage

  • Highlight the tax on shipping fee on your checkout or cart page for extra transparency;
  • Let your buyers know the total shipping fee tax on each product page as they add more products to their cart.

Example Input

Example Output

[wcj_cart_shipping_total] #

Overview

This shortcode displays the total shipping fee, applicable on the customer’s cart. You may add it on any of your shop (or website) pages to inform the customers how much shipping charge is applicable on the products/items that they have added to their cart at present.

Possible Usage

  • Let users see shipping fees even when they are on one of your site pages. By adding a link to get back to the shop alongside it, you may reduce the bounce rate.
  • Show total shipping fee on any of your product pages.
  • Display shipping fee in your desired location on the account, checkout, or cart page in your WooCommerce shop.

Example Input

Let’s say a customer visits the Refund and Returns Policy page after adding a few products to the cart. It is very much probable in the case of first-time buyers. However, they may forget to complete the purchase or leave from there only. 

To prevent cart abandonment, you may use a notification that displays the total shipping fee details and a link to shop page. It will clarify customers’ doubts about the shipping total and give them a quick reminder that they were about to complete the purchase.

Output

[wcj_cart_fee_total] #

Overview

Want to show the total cart fee for your customers in a customized manner? Use the shortcode [wcj_cart_fee_total] to do so. 

As your WooCommerce may have various extra fees, e.g. packaging fee, customization fee, handling fee, etc., the total of these additional fees can be shown on any of the shop pages – alongside the details section on your cart/checkout pages – to make sure there is no confusion.

Args

Check and use shortcodes common args (Booster – All Plugins).

Possible Usage

  • Use this shortcode on the shop or website pages to display fees applicable to the cart.
  • If required, you can even print/echo this shortcode’s value by adding it to your PHP files.

Example Input

Let’s say, you want to show the cart fee total on all your category pages in the shop. For this, you can edit the archive-product.php file using the Template Editor Plugin

We added the following lines to the files for this purpose:

<div style=”background-color:green; color:white;”><b>

<?php echo do_shortcode(‘Total Fee on Cart Amount is: $0.00‘); ?>

</b></div>

Output

[wcj_cart_fee_tax] #

Overview

By default, the cart or the checkout page in WooCommerce shows the cart fee taxes inclusive in each cart fee. However, to clarify how much tax is applied on cart fees, you can use the [wcj_cart_fee_tax before] shortcode. 

It lets you show the tax amount, applied on the current cart fee value.

Args

You may use attributes/parameters before, after, site_visibility, visibility, location, wpml_language, and not_wpml_language with this shortcode. See details on how to use them here.

Possible Usage

  • Show Cart Fee Tax separately to your buyers on the cart page or checkout page;
  • Show cart fee tax on single product pages or archive pages.

Example Input

Let’s add this content on the Cart Page:

[wcj_cart_fee_tax before=”Tax Applied on the Cart Fee: “]

Output

[wcj_cart_total_ex_tax] #

Overview

This shortcode enabled store owners to display or use the Total Cart Amount (Exclusive of Taxes) on any page through the WooCommerce shop. In fact, you can also display this amount anywhere on your website too.

Args

All the Common Attributes (all products) work for this Booster shortcode. Find more details here.

Possible Usage

  • Insert this shortcode in your template files to directly display it or to use it in further calculations.
  • Add it to any of the cart pages, e.g. cart details, checkout, account, etc.
  • Show this detail on your single product pages, archive pages, or website pages.

Example Input

[wcj_cart_total_ex_tax before=”Cart total (excl. tax): “

(Added on the Top of the WooCommerce Cart Page)

Output

[wcj_cart_discount_tax] #

Overview

The Booster WooCommerce cart discount set shortcode, [wcj_cart_discount_tax] is used to display the discount being applied on the cart tax. As the tax value is added to the customer tax without any explanation of tax discount when you are using the default settings, you can use this shortcode to provide clear distinction about every tax, discount, and amount to your buyers.

Args

All the Shortcode Common attributes (before, after, site_visibility, location, visibility, wpml_language, and not_wpml_language) can be used with this shortcode. Find related details here.

Possible Usage

  • Apply discount on cart tax and show its value to buyers;
  • Use coupons, applicable on taxes, and specify the discounted tax amount to your buyer during checkout or in the cart total details.
  • Show product prices inclusive of taxes, without showing the tax separately. And while applying the discount, clarify how much discount is on the base cost and how much is it on the tax value.

Example Input

If your store applied a location-based discount of 12% on WooCommerce tax, the total discounted amount will be shown when you will use this shortcode. 

For example, if the total cart tax is ₹15, your cart look similar to this before a discount on the tax is applied:

Output

After the discount is applied:

(Here, the shortcode applied is: [wcj_cart_discount_tax before=”Discount tax: “])

[wcj_cart_discount_total] #

Overview

Use this shortcode to show the total discount applied to the buyer’s cart. It will be helpful for the customer when there are multiple discounts mentioned in the calculation but he wants to view the total discount at once.

Syntax and Arg

[wcj_cart_discount_total arg1=”value1″ arg2=”value2″ …]

Where arg could be any attribute from the Booster Common Attributes List > All Plugins.

Usage

  • Display cart discount total as the discount summary on your cart or checkout page. 
  • Show cart discount on each page of your shop, in order to encourage the buyer to checkout.

Example Input

Let’s say, you want to show a display notification on the top of your cart, highlighting the amount availed by the buyer as per the cart’s current status. 

[wcj_cart_discount_total before=”Congrats. Pay ” after=” Less.”]

Output

[wcj_cart_total] #

Overview

This shortcode displays the total cart value after summing up the basic cost per product and subtracting the total discounts. It is the cart total before applying any fee or taxes.

Usage

  • Display the cart total or its multiple on any shop page.
  • Give special Cart Total based discounts for offline purchases or payments using this functionality.

Args

You may use the [wcj_cart_total] shortcode with common Booster attributes from the All Plugins list on this page. Besides, you may use the following attribute to show a multiple of cart subtotal instead of the total amount itself:

multiply_by – Its default value is 1.

Syntax (Examples)

  • [wcj_cart_total]
  • [wcj_cart_total multiply_by=‘0.1’]
  • [wcj_cart_total multiply_by=‘2’]
  • [wcj_cart_total before=“Cart Total is ”]

Input

On the cart page, we have added –

[wcj_cart_total before=”Cart total: “]

[wcj_cart_total before=”Show receipt and get ” after =” OFF on buying from our retail sto next time.” multiply_by=’0.1′]

Output

[wcj_cart_items_total_quantity] #

Overview

The buyer’s cart, by default, shows the total quantity of items per product in the list. However, if you want to tell your customers the total number of items their cart has at present, use the shortcode [wcj_cart_items_total_quantity].

Using this shortcode, you will be able to display the total cart quantity anywhere in your shop, from the single product pages to the cart pages, and website pages.

Usage

  • Show total cart quantity on your cart details page
  • Show total cart quantity on the checkout page
  • Display total cart quantity on all pages when you have a minimum or maximum limit on item count. It will keep reminding the buyer about the limit.
  • Add a hyperlink to the cart or checkout page with the cart items total quantity value on shop or website pages. It may increase your checkout/conversion rate.

Args

Use the following shortcode attributes as per your requirements:

  • before: Add the prefix text;
  • after: Add the postfix text;
  • visibility: Set visibility by user role;
  • location: Set visible by country code through IP detection;
  • site_visibility: Show the output on particular page(s), e.g. single, page,  and/or archive;
  • wpml_language: Show the output for one or several WPML languages only.
  • not_wpml_language: Hide the output for one or several WPML languages only.

Details description of these attributes can be found here.

Input Example:

[wcj_cart_items_total_quantity before=“Total items:”]

Output:

[wcj_cart_items_total_weight] #

Overview

The cart details page or the checkout page, by default, do not show this information to your buyer. In fact, product/item weight is visible on the single product page > Additional Information section, implying the information is not directly invisible but on click. 

However, with the [wcj_cart_items_total_weight] Booster shortcode, you can display the total cart weight to your buyers on cart details, checkout, website pages, and single product pages.

So, the buyers, before making the purchase, won’t be confused about the cart weight, even if they couldn’t see the per-item cart quantity on the single product page(s).

Args

Use the Common Booster attributes from the list of shortcode attributes that work for All Plugins.

Example Input

[wcj_cart_items_total_weight before=“Cart Weight is ”]

Output

Powered by BetterDocs