Cart Trigger Shortcode
You might have already checked the “Cart Menu Item” settings section which allows us to add a cart menu icon in the menu and toggle the floating cart through it. But what if you want to add an icon/button on a page or somewhere else on the site to toggle the floating cart? That is where Cart Trigger Shortcode comes into action. Let’s have a look at each of the settings available in this section.
Enable Cart Trigger Shortcode: It's simple and straightforward. You need to set it to “Yes” to make the shortcode working.
The Shortcode: This will provide you with the shortcode to be used for this purpose. Please refer to your plugin’s settings to verify the current working shortcode for this. At the time of writing this documentation, the shortcode in use is: [xt_woofc_shortcode]
Hide on this device screen: This setting has three icons at the top right corner. You can click on each icon to set this setting individually for each screen size. This setting allows you to hide the cart trigger shortcode according to the screen size.
Overall Size: This setting will let you set the size of the cart trigger individual for each screen size. This will change the size of the icon and the text with it. If you want to only change the size of the icon, check the other setting “Icon Size” below.
Display Mode: There are different display modes available for this cart trigger icon. These are Icon only, Counter, Price (shows total cart price) and both (this will display the icon with cart price)
If cart is empty, show icon only: If you choose to display the price or cart from previous display settings, when the cart is empty, It will display the cart icon and 0 items (if the counter is selected) or 0 prices (if the price is selected). This behaviour can be changed through these settings. If you set this to “Yes”, even after choosing to display price, it will only show the price when there is an item in the cart.
Counter Type: This setting is only available if you choose “Counter” or “Both” in the “Display Mode” setting. There are two options available in the counter type option. By default, it will be a text and the other option is the badge. Selecting the badge will show the item counter in a circular. If you select the badge from this option, the other few settings will also become available.
Counter Badge Position: Selecting the “above” option for this setting will display the badge above the icon. Choosing inline will simply display the counter badge next to the icon. This setting is only available if the counter type is chosen as a badge
Counter Badge Size: This setting will let you resize the badge. This setting is only available if the counter type is chosen as a badge
Counter Badge Color: The color of the text in the badge can be changed through this setting. This setting is only available if the counter type is chosen as a badge
Counter Badge Bg Color: This setting will let you change the background color of the badge. This setting is only available if the counter type is chosen as a badge
Click Action: You can change the default option of the cart trigger shortcode. The default behaviour is to toggle the floating cart but it can be changed to redirect to the cart page or checkout page.
Icon Size: This setting will let you resize the icon (only) of the cart trigger shortcode.
Select Icon: There are different icons available to select for the cart trigger shortcode through this setting.
Icon Color: This is a color field and you can choose a color for the cart icon through this.
Text Color: This setting will only work if you select to display price or badge using the display mode setting. This setting can control the color of the text.
All the settings above can be seen in action in the following video.