Announcement

Collapse
No announcement yet.

I want to include the stock level against my products in the store pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I want to include the stock level against my products in the store pages

    To include the current stock level against a product, click on a product in the 'Design' tab to bring up the layout code for that product and then insert the 'StockLevel' variable into the code.

    You can incorporate the 'StockLevel' variable into a condition to show/hide different messages based on the stock level.

    This exercise will show you how to include a stock message that will only appear if the product is stock monitored and there is less than 10 of them in stock.

    1. In the Design tab, select any product layout by clicking on a product name.
    2. Scroll to the bottom of the layout code of that product layout until you find 'ProductRelatedProductsList'.
    3. Add a blank line just below this line.
    4. Insert a <br /> into this line.
    5. Then enter the following text:

    'This product is running low on stock. Please call us to check availability'.

    6. Click 'Apply'. The text should appear for some or all of the products on this page.
    7. Now highlight the entire line you entered and click the 'Insert Block' button on the layout code toolbar
    8. This will open the 'Expression Editor'. You are going to create a condition that says 'the product is stock monitored AND there is less than 10 of them in stock'.
    9. Start typing 'IsStock...'. You should see SellerDeck prompting you to insert a variable. Select 'IsStockMonitored' by pressing 'Enter' on your keyboard.
    10. Now click the 'Insert an operator into expression' button and select 'And' from the drop-down list provided.
    11. Type a standard left bracket - '('
    12. Now start typing 'StockLevel'. When SellerDeck prompts you to enter the 'StockLevel' variable into the design, press 'Enter' on your keyboard.
    13. From the 'Insert Operator...' list, select 'Less Than'.
    14. Now type '10' (without the quotes) and enter a standard right bracket - ')'
    15. Click 'OK'.
    16. Click 'Apply' to confirm the changes.

    Now change to the 'Content' tab to test this change.

    1. Go to any product in the content tree and go to the 'Stock' tab.
    2. Select 'Stock Monitoring' and enter an 'Estimated Stock In Hand' of '6'.
    3. Click 'Apply changes'. The stock message should be visible in the preview. It will be underneath your list of 'also bought' products, if you have one displayed.
    4. Now change the 'Estimated Stock In Hand' to '20' and click 'Apply changes'.
    5. The stock message should disappear.
Working...
X