User Guide of Magento 2 Who Bought This Also Bought Extension
General Configurations
At the backend, go to FME EXTENSIONS > Configurations. Here you can find the extension configurations.
-
Hide Out of Stock: Options to Hide / Unhide Out of Stock Products in the slider by selecting Yes/No
-
Store Views: Choose the store views on which slider will be shown e.g. Default Store View
-
Customer Groups: Choose one or more customer groups to which slider will be shown:
-
Order Statuses: Show products in slider on the basis of order status:
Cart Page Settings
- Enable Slider: Option to Enable / Disable slider on the cart page
- Title: Set title to appear on the products’ slider as heading
- Items in Slider: Set the limit of items to appear on cart page slider
- No. of Products: Set the limit of products to display in the slider
- Display Options: Specify options to display with products in slider:
- Add to cart
- Rating
- Add to wish list
- Product price
- View Type: Choose any of the products view type among Slider and Grid
- Position: Select the display position of the slider on the cart page
- Disable Cross-sell: Select yes/no to enable/disable cross-sell products
- If No WBTAB: Option to procced in a scenario when there is no WBTAB (Who Bought This Also Bought):
- Random Products
- Show Slider
Product Page Settings
- Enable Slider: Option to Enable / Disable slider on product page
- Title: Set title to appear on the products’ slider as heading
- Items in Slider: Set the limit of items to appear on product page slider
- No. of Products: Set the limit of products to display in the slider
- Display Options: Specify options to display with products in slider:
- Add to cart
- Rating
- Add to wish list
- Product price
- View Type: Choose any of the products view type among Slider and Grid
- Position: Select the display position of the slider on the product page
- Disable Upsell: Select yes/no to enable/disable upsell products
- If No WBTAB: Option to procced in a scenario when there is no WBTAB (Who Bought This Also Bought):
- Random Products
- Show Slider
Category Page Settings
-
Enable Slider: Option to Enable / Disable slider on category page
-
Title: Set title to appear on the products’ slider as heading
-
Items in Slider: Set the limit of items to appear on category page slider
-
No. of Products: Set the limit of products to display in the slider
-
Display Options: Specify options to display with products in slider:
- Add to cart
- Rating
- Add to wish list
- Product price
-
View Type: Choose any of the products view type among Slider and Grid
-
Position: Select the display position of the slider on the category page
-
If No WBTAB: Option to procced in a scenario when there is no WBTAB (Who Bought This Also Bought): Random Products Show Slider
Frontend
After configuring the extension and saving the changes, customers will see frequently bought together products on products and category pages as shown below.
Product Page
Category Page
GraphQL APIs
1. Get Product Related Who Bought This Also Bought
Description: Explore additional items that other customers frequently purchased alongside this product, curated to complement your selection and enhance your shopping experience.
Query
query {
productRelatedWBTAB(productId: 1812) {
getProductSkus
}
}
Result
{
"data": {
"productRelatedWBTAB": {
"getProductSkus": [
"MH07",
"MS10",
"WT08"
]
}
}
}
2. Get Category Related WBTAB
Description: Discover a curated selection of related categories that other shoppers have explored, offering additional options and products to complement your interests and shopping preferences.
Query
query {
categoryRelatedWBTAB(categoryId: 21) {
getProductSkus
}
}
Result
{
"data": {
"categoryRelatedWBTAB": {
"getProductSkus": [
"MH09",
"MJ03",
"MS10",
"WS04",
"WS06",
"WS02",
"WT09",
"MH07",
"WT08"
]
}
}
}
3. Get Cart Related WBTAB
Description: This query works for both logged-in and guest customers. If the authentication token is not provided, it retrieves the 'Who Bought This Also Bought' results for the cart based on the cart_id for a guest user. If the authentication token is included in the header, the query will return results for the logged-in customer.
Query
query {
cartRelatedWBTAB(cartId: "kdhW9ourYzXA8sdvMG3vxZkxU9wCJA3G") {
getProductSkus
}
}
Result
{
"data": {
"cartRelatedWBTAB": {
"getProductSkus": [
"24-MB04",
"24-MB03"
]
}
}
}