With the shortcode [yith_ywraq_request_quote] you insert the complete list of products that users add to their quote request and the form to get in touch with the shop administrator.
This shortcode must be used on the Request a Quote page. You can set this page from the Request quote page > Page options tab.
On the frontend it looks as follows:
The [yith_ywraq_number_items] shortcode shows the number of products available in the list.
Its parameters are:
- ‘class’: div class (es. ‘ywraq_number_items’)
- ‘show_url’: the whole content links to the list page (yes/no)
- ‘item_name’: label inserted after the number, if single element in the list
- ‘item_plural_name’: label inserted after the number, if two or more elements in the list
Example: [yith_ywraq_number_items class=”ywraq_number_items” show_url=”yes” item_name=”item” item_plural_name=”items”]
The following shortcode lets you add the mini cart widget anywhere in your site where you can enter some text:
Here you find also all the attributes that the shortcode supports with default values:
- title: enter here the text that you want to show as widget title. The default value is “Quote list”.
- item_name: this is the singular name shown where there is only 1 item in the quote list. The default value is “item”, but you can change with any text you wish, for example, “product”, “event” or whatever name shown as a singular label.
- item_plural_name: this is the plural name shown where there are more than 1 items in the quote list. The default value is “items”, but you can change it with any plural noun of your choice.
- show_thumbnail: choose whether to show the thumbnail of the products in the list or not. Use 1 to show them, 0 to hide them. The default value is 1.
- show_price: choose whether to show the price of the products in the list or not. Use 1 to show, 0 to hide. The default value is 1.
- show_quantity: choose whether to show the quantity selected for each product in the list or not. Use 1 to show this information, 0 to hide. The default value is 1.
- show_variations: choose whether to show the selected variation for the products in the list or not. Use 1 to show this information, 0 to hide. The default value is 1.
This is an example of how it might look like.
Moreover, if you want to add this code into your theme code files, you can use the following instruction, which includes the shortcode:
<?php echo do_shortcode('[yith_ywraq_mini_widget_quote]'); ?>
Whenever you need to show the add to quote button on a custom page or in a specific place of the page, you can rely on this shortcode:
Make sure you enter the product’s ID with the parameter “product” to link the button to the right product in your WooCommerce. For example:
[yith_ywraq_button_quote product="1234"] will let your users add product with ID 1234 to the cart.
However, it is not necessary to enter the product ID when using the shortcode on a standard WooCommerce product page, as it will automatically link the button to the product it belongs to.
With the following shortcode you can show the list of all quote requests that have been submitted so far by the user.
The shortcode prints a table that looks like this.
Please, note: the list will only be visible to the user if he/she has placed at least one quote request. Every user will see a list with his/her own quotes only.
The shortcode [yith_ywraq_cross_sells] allows showing cross-sell products on the quote page and gives users the possibility to add them to the quote through the Add to quote button.
This shortcode must be used on the Request a Quote page.
You must select the cross-sell products from the product edit page so that when it is added to the quote list, the cross-sells you have selected will show as in the sample below.