Woolentor Addons Shortcodes

Below, you’ll find a detailed guide on how to add the Woolentor Addons Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Woolentor Addons Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Woolentor Addons Plugin and the shortcodes it provides:

Plugin Icon
ShopLentor – WooCommerce Builder for Elementor & Gutenberg +10 Modules – All in One Solution (formerly WooLentor)

"ShopLentor is a versatile WooCommerce Builder for Elementor & Gutenberg. It includes over 10 modules, offering an all-in-one solution for your eCommerce site. Formerly known as WooLentor, it's the ultimate tool for online shop customization."

★★★★✩ (176) Active Installs: 100000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [woolentorsearch]
  • [evercompare_button]
  • [evercompare_table]
  • [wlpb_trigger_button]
  • [swatchly_pl_swatches]
  • []

Woolentor Addons [woolentorsearch] Shortcode

The Woolentor Search shortcode is a powerful tool for enhancing user experience. It enables an AJAX-powered product search feature within your WordPress site. This shortcode enqueues necessary styles and scripts, then extracts given attributes to customize the search feature. It sets a search limit, placeholder text, and an option to include product categories in the search. The shortcode creates a search form with a unique ID, fields for input, and options for product categories. It also includes loading and clear icons for user interaction. The search results are displayed in a dedicated wrapper.

Shortcode: [woolentorsearch]

Parameters

Here is a list of all possible woolentorsearch shortcode parameters and attributes:

  • limit – Determines the maximum number of search results to display.
  • placeholder – Sets the text that appears in the search box before user input.
  • show_category – If set to ‘1’, a dropdown of product categories will be displayed.
  • all_category_text – Sets the text for the option to search all categories.

Examples and Usage

Basic example – A simple shortcode example that uses the default settings for the Woolentor search plugin. The ‘limit’ attribute is set to 10, and the ‘placeholder’ attribute is set to ‘Search Products’. The ‘show_category’ attribute is set to false, meaning that the category dropdown will not be displayed.

[woolentorsearch /]

Advanced examples

Using the shortcode to display a Woolentor search form with a limit of 5 search results. The placeholder text is set to ‘Find Your Product’, and the ‘show_category’ attribute is set to true, meaning that the category dropdown will be displayed.

[woolentorsearch limit="5" placeholder="Find Your Product" show_category="true" /]

Using the shortcode to display a Woolentor search form with a limit of 20 search results. The placeholder text is set to ‘Search Our Store’, and the ‘show_category’ attribute is set to true. The ‘all_category_text’ attribute is set to ‘All Departments’, which will change the default text for the category dropdown.

[woolentorsearch limit="20" placeholder="Search Our Store" show_category="true" all_category_text="All Departments" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [woolentorsearch] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'woolentorsearch', [ $this, 'shortcode' ] );

Shortcode PHP function:

Code file location:

woolentor-addons/woolentor-addons/includes/modules/ajax-search/base.php

Woolentor Addons [evercompare_button] Shortcode

The Woolentor-addons plugin shortcode, ‘evercompare_button’, is designed to generate a comparison button for products on your WordPress site. It fetches button settings from the plugin’s options, such as button text, position, and style. It also retrieves the icons for the button. The shortcode then creates a button with these settings and places it on the product page. It also includes the functionality to change the button text once a product has been added for comparison.

Shortcode: [evercompare_button]

Parameters

Here is a list of all possible evercompare_button shortcode parameters and attributes:

  • product_id – The unique identifier for the product
  • button_url – The URL where the button will redirect to
  • button_class – The CSS class for the button
  • button_text – The text that appears on the button
  • button_added_text – The text that appears after the product is added
  • template_name – The name of the template to be used for the button

Examples and Usage

Basic example – Display the compare button for a specific product by referencing its product ID.

[evercompare_button product_id=101 /]

Advanced examples

Display the compare button with a custom button URL, and specific button classes. The button will lead to the specified URL when clicked, and the button classes will determine the button’s appearance.

[evercompare_button product_id=101 button_url="http://example.com/compare" button_class="custom-button-class" /]

Display the compare button with custom button text and added button text. The button text will be displayed on the button when the product has not been added to the compare list, and the added button text will be displayed when the product has been added to the compare list.

[evercompare_button product_id=101 button_text="Compare this product" button_added_text="Product added" /]

Display the compare button with a custom template. The template name will determine the layout and style of the compare button.

[evercompare_button product_id=101 template_name="custom-template" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [evercompare_button] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'evercompare_button', [ $this, 'button_shortcode' ] );

Shortcode PHP function:

Code file location:

woolentor-addons/woolentor-addons/includes/modules/compare/includes/classes/Frontend/Shortcode.php

Woolentor Addons [evercompare_table] Shortcode

The Woolentor-addons plugin shortcode, ‘evercompare_table’, is designed to manage product comparison tables. This shortcode enqueues styles and scripts, fetches options data, retrieves compared products and fields, and sets default attributes. It then merges these attributes with user-defined ones and returns a comparison table.

Shortcode: [evercompare_table]

Examples and Usage

Basic example – A simple use case of the shortcode to generate a comparison table for the product with a specific ID.

[evercompare_table id="1" /]

Advanced examples

Using the shortcode to generate a comparison table for multiple products by specifying their IDs. The table will display the comparison fields for the products with the IDs 1, 2, and 3.

[evercompare_table id="1,2,3" /]

Using the shortcode to generate a comparison table for a product and customizing the return shop button text. The table will display the comparison fields for the product with the ID 1 and the return shop button will have the text “Back to Store”.

[evercompare_table id="1" return_shop_button="Back to Store" /]

Using the shortcode to generate a comparison table for a product and customizing the empty compare text. The table will display the comparison fields for the product with the ID 1 and if no comparison fields are available, the text “No Comparison Available” will be displayed.

[evercompare_table id="1" empty_compare_text="No Comparison Available" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [evercompare_table] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'evercompare_table', [ $this, 'table_shortcode' ] );

Shortcode PHP function:

Code file location:

woolentor-addons/woolentor-addons/includes/modules/compare/includes/classes/Frontend/Shortcode.php

Woolentor Addons [wlpb_trigger_button] Shortcode

The Woolentor ‘wlpb_trigger_button’ shortcode is a versatile tool to customize buttons on your WordPress site. It allows you to define button actions, redirect URLs, button text, button icon, icon position, and button alignment. The shortcode lets you create a button that can either close a popup or redirect to a previous page. It also offers customization options for the button text, icon, and alignment.

Shortcode: [wlpb_trigger_button]

Parameters

Here is a list of all possible wlpb_trigger_button shortcode parameters and attributes:

  • action – determines the action to be taken, either closing the popup or redirecting to a previous page.
  • redirect_url – the URL to which the page will redirect if the ‘go_back_to_previous_page’ action is selected.
  • button_text – the text that will be displayed on the button.
  • button_icon – allows you to add an icon to the button.
  • icon_position – specifies the position of the icon on the button, either left or right.
  • button_align – sets the alignment of the button, it can be centered or aligned to the left or right.

Examples and Usage

Basic example – A simple usage of the wlpb_trigger_button shortcode with the default attributes.

[wlpb_trigger_button /]

Advanced examples

Customizing the wlpb_trigger_button shortcode to change the button text and action, and align the button to the right.

[wlpb_trigger_button button_text="Go Back" action="go_back_to_previous_page" button_align="right" /]

Using the wlpb_trigger_button shortcode to add an icon to the button, position it to the right, and redirect the user to a different URL after clicking the button.

[wlpb_trigger_button button_text="Visit Our Store" button_icon="fas fa-store" icon_position="right" redirect_url="https://www.example.com/store" /]

Using the wlpb_trigger_button shortcode to display a button with a custom HTML icon. The icon will be positioned to the left of the button text.

[wlpb_trigger_button button_text="Read More" button_icon="<i class='fas fa-book-open'></i>" icon_position="left" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wlpb_trigger_button] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wlpb_trigger_button', array($this, 'wlpb_trigger_button_shortcode_cb'));

Shortcode PHP function:

Code file location:

woolentor-addons/woolentor-addons/includes/modules/popup-builder/includes/class-shortcodes.php

Woolentor Addons [swatchly_pl_swatches] Shortcode

The Woolentor-addons plugin shortcode, ‘swatchly_pl_swatches’, is used to display product variations in a WooCommerce store. The shortcode calls the ‘get_loop_variation_form_html’ function, which checks if the product is variable. If it is, it enqueues the necessary scripts, retrieves product variations, and generates an HTML form. This form displays each variation as a dropdown option, allowing customers to select their preferred product variant. The function also includes options for hiding out-of-stock messages and aligning the form according to the user’s preferences. It’s a powerful tool for enhancing your WooCommerce store’s user experience.

Shortcode: [swatchly_pl_swatches]

Examples and Usage

Basic example – The following shortcode will display the swatches for a variable product by referencing the product ID.

[swatchly_pl_swatches id=123 /]

Advanced examples

Using the shortcode to display the swatches for multiple variable products. The swatches will be displayed for each product referenced by their respective IDs.

[swatchly_pl_swatches id="123,456,789" /]

Using the shortcode to display the swatches for a variable product and hide the out of stock message. The swatches will be displayed for the product referenced by the ID and if the product is out of stock, the out of stock message will be hidden.

[swatchly_pl_swatches id=123 hide_out_of_stock_message=true /]

Using the shortcode to display the swatches for a variable product and align the swatches. The swatches will be displayed for the product referenced by the ID and the alignment of the swatches can be set to left, center, or right.

[swatchly_pl_swatches id=123 align="center" /]

Using the shortcode to display the swatches for a variable product, hide the out of stock message, and align the swatches. The swatches will be displayed for the product referenced by the ID, the out of stock message will be hidden, and the alignment of the swatches can be set to left, center, or right.

[swatchly_pl_swatches id=123 hide_out_of_stock_message=true align="center" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [swatchly_pl_swatches] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'swatchly_pl_swatches', array( $this, 'get_loop_variation_form_html') );

Shortcode PHP function:

Code file location:

woolentor-addons/woolentor-addons/includes/modules/variation-swatch/includes/Frontend/Woo_Config.php

Conclusion

Now that you’ve learned how to embed the Woolentor Addons Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *