Stores page banner #
On O4B and other marketplaces, we display a banner based on the vendor’s settings:
- “Shop Our Catalog” if the vendor has products listed and available for purchase.
- “Learn More” if the vendor has a WordPress site.
- There is no banner if the vendor has no product listings or a WordPress site.
Here is an example of how it will look:
Uservice call examples:
Show Banner conditions: #
The conditions for displaying the banners on the store page involve the `WP_STORE_NAME` and `STORE_CATALOG` store item properties:
1. Display Shop Our Catalog Banner:
- If `WP_STORE_NAME` exists and `STORE_CATALOG` is “yes”.
2. Display Learn More:
- If `WP_STORE_NAME` exists and `STORE_CATALOG` is “no”
- or if `WP_STORE_NAME` does not exist and `STORE_CATALOG` is “no”.
- `STORE_CATALOG` should be “no” when products are unavailable for purchase.
3. Do not display a banner:
- If neither `WP_STORE_NAME` nor `STORE_CATALOG` is present.
Show Add to cart button conditions: #
For certain vendors, we need to hide the “Add to Cart” button on the category and product pages.
Here’s what we need to do to achieve this:
- On the category page:
The vendor store setting must be SupplierProductListingLevel
= 1 of Product Cannot be ordered.
- On the product page:
The product must be set to ‘discontinue’ on the inventory record