Passa al contenuto principale

Automatic/Realtime Stock Control - Knowledgebase / Stock Control - ShopFactory Help Center

Automatic/Realtime Stock Control

Elenco degli autori

Automatic Stock Control function - REQUIREMENTS:

  • Your Host MUST support PHP - at least PHP 5 is enabled in your hosting account. Our PHP script must be able to overwrite the stock control file on your server.
    • Please verify with your Hosting provider if these PHP Settings are allowed in your account (NOT restricted): 
      - Be able to create directories in your ftp/hosting account
      - have read & write access to the directories on the server
      - be able to change permissions in the directories on the server
  • This feature is applicable to all ShopFactory V9, V10, V11, and V12 users. For old version users such as V7 and V8 fixed version users, you must have an existing GlobeCharge account (at least a FREE GlobeCharge account or a paid service subscription account so you will have a username and password) to use this feature.

Assumption: You have already enabled stock control following the steps in our KB article -

http://www.help.shopfactory.com/help12/contents/en-us/d140.html

https://shopfactory.deskpro.com/en-GB/kb/articles/en-how-do-i-set-up-product-stock-control

(If you are using the latest ShopFactory release, only stock levels which have changed will be uploaded)

- Open your shop in ShopFactory

- Click on "Enable automatic updates of Stock Levels" from the Services Menu 

14467TMPQDBBQZBPQQAD0-1613358412263.png

Important: If you have enabled the "automatic updates of stock levels" feature, please note that you need to "separately" publish your stock levels.

Publishing your shop does not publish your stock levels, as realtime stock control requires a Stock file to be published to your server separately by clicking on the "Update stock levels..." button found in the stock level window. This will only upload & synchronize your stock levels file - not the entire Shop. It will use the Hosting details you entered in the Publish SETUP dialog box so make sure you have entered correct ftp details in Publish -> Publish your website on the Net -> SETUP -> enter correct hosting details -> OK.

- Click on Central dropdown -> Stock Levels  

If this is the first time you have setup realtime stock control, you need to enter the actual stock levels of all your products - you can even define the minimum and maximum quantity of products that can be ordered in this dialog.   

- Click on the "Settings..." button if you want to change the stock display type into the exact number of stock level instead of using the "traffic light" -> click OK 

14469ZPBMYYSTHPPGAWC0-1613358682580.png

- Once you start selling products online it is important that you follow the steps below to synchronize your actual online stock file first before editing the stock levels. 

IMPORTANT: When you open the stocks dialog box, you need to click on the “UPDATE STOCK LEVELS...” button to synchronize the online stock. The online stock must first be synched by downloading the latest online stock file.

- Once the online stock is synched, you can now start editing the actual stock levels of your shop.

- If you have updated stock levels of your products, you will need to click on the  “UPDATE STOCK LEVELS...” button to upload the local stock file to your server. If your shop has also been updated, click YES if a prompt shows to also publish your shop.

Please ensure that you click on “UPDATE STOCK LEVELS...” button to synchronize the online stock before manually changing the stock levels of your products.

If you are not seeing your stock levels or stock traffic light in your online shop, then ensure your hosting account supports PHP and that you have successfully uploaded your stock file.

Check if online stock file exists, for example, http://test-app.shopfactory.com/contents/stkcontrol/stkLevelLog/stkLevel.txt

The stock file is located in this patch on your Host:

/contents/stkcontrol/stkLevelLog/stkLevel.txt

Follow the suggestions below to refresh your local stock file:

1)  Close ShopFactory and then delete stkLevel.txt and stkCacheAll.txt files from the shop folder 

Remove the stkLevel.txt and stkCacheAll.txt files from the shop folder and try again:

- Close ShopFactory

- Open Windows Explorer and navigate to your shop folder. By default, SF projects are stored in “My Documents\ShopFactory V12 Websites” folder

- Open your shop folder and then delete these files:

<project folder>\stkLevel.txt

and

<project folder>\stkCacheAll.txt

2) IMPORTANT: Please carefully follow this step as this will regenerate your stkLevel.txt file:

- Open your shop in ShopFactory 

- Important: Click the Central dropdown -> then hold down CTRL key on your keyboard whilst clicking on Stock Levels

- Then click on “Update stock levels...” button

- Publish your shop again if a prompt shows to publish your shop as well.

- Once the shop has been published, click OK on the Stock Levels dialog to exit.

Please note that:

1. stkLevel.txt file is the one that gets published and updated when an order is made.

- If this file goes missing in your shop project folder, the stklevel.txt will be re-generated when the "Update stock levels..." (Publish) button is clicked within the "Stock Levels" dialog.

2. stkCacheAll.txt file is a cache file that ShopFactory creates/uses for display of the stock dialog.

- If this file is missing, the stkCacheAll.txt is created upon opening the stock dialog.

- Click Central dropdown -> Stock Levels dialog -> and then stkCacheAll.txt will be created.

- If you click on "Update stock levels..." button, the stkLevel.txt file is created.