![]() |
VOOZH | about |
To find the WooCommerce Cart Suggestions plugin settings follow: admin barβ WooCommerceβ Cart Suggestions.
Contains general settings for Cart Suggestions.
Cart Suggestion Setup
Contains setting to set custom CSS code that will be added to frontend pages.
[br_cart_suggestion] β shortcode to display suggested products
Options:
Public function to get WooCommerce version
return string. woocommerce version
Generate multiple products selector with search field
return string or void. HTML code
All of these functions are in the BeRocket_cart_suggestion class as static functions.
Function for initializing scripts.
Function for initializing scripts and settings page in the Admin Bar.
Add option page to admin menu.
Get template part (for templates like the slider).
Default templates are placed in plugins folder woocommerce-cart-suggestions/templates.
To rewrite the template in your theme folder create folder with the name woocommerce-cart_suggestion and place a new template with identical name in this folder.
Function for displaying suggested products on cart page
Template that is used in plugin.
Parameters
Usage
<?php
function change_cart_suggestion_get_template_part ( $template, $name ) {
//your code here
return $template;
}
add_filter( 'cart_suggestion_get_template_part', 'change_cart_suggestion_get_template_part', 10, 2 );
?>Title for widgets and shortcodes.
Parameters
Usage
<?php
function change_cart_suggestion_widget_title ( $title ) {
//your code here
return $title;
}
add_filter( 'cart_suggestion_widget_title', 'change_cart_suggestion_widget_title' );
?>Products count for widgets and shortcodes.
Parameters
Usage
<?php
function change_cart_suggestion_widget_count ( $count ) {
//your code here
return $count;
}
add_filter( 'cart_suggestion_widget_count', 'change_cart_suggestion_widget_count' );
?>Type of widgets and shortcodes.
Parameters
Usage
<?php
function change_cart_suggestion_widget_type ( $type ) {
//your code here
return $type;
}
add_filter( 'cart_suggestion_widget_type', 'change_cart_suggestion_widget_type' );
?>Use Add to cart button or not in widgets and shortcodes.
Parameters
Usage
<?php
function change_cart_suggestion_widget_add_to_cart ( $add_to_cart ) {
//your code here
return $add_to_cart;
}
add_filter( 'cart_suggestion_widget_add_to_cart', 'change_cart_suggestion_widget_add_to_cart' );
?>Product count per line or per slide for slider type in widgets and shortcodes.
Parameters
Usage
<?php
function change_cart_suggestion_widget_slider_count ( $count ) {
//your code here
return $count;
}
add_filter( 'cart_suggestion_widget_slider_count', 'change_cart_suggestion_widget_slider_count' );
?>