Managing Product Status
When editing products, you can schedule them to expire or unpublish them manually to remove them from your store catalog.
Setting Product Expiration Dates
Set expiration dates for products or individual SKUs. While expired, the product SKUs are removed from your store catalog and are no longer available for purchase or visible in search results.
Setting an expiration date at the product level applies it to all of the product’s SKUs.
Follow these steps:
-
Open the Global Menu () menu and navigate to Commerce → Products.
-
Click a product.
-
Under Schedule, uncheck Never Expire. This configuration affects all of the product’s SKUs.
-
Enter an expiration date and time.
tipExpiration dates and times are based on the Liferay instance’s time zone. To view or change the time zone, open the Global Menu () and go to Control Panel → Instance Settings. Then, navigate to Localization → Time Zone.
-
Click Publish.
Once a product reaches its expiration date and time, it remains active until Liferay’s next check interval. The default interval is 15 minutes, but you can configure this via system settings. Open the Global Menu () and navigate to Control Panel → System Settings. Once there, navigate to Catalog → Products. Change the Check Interval value and click Save.
If you require this feature to be disabled, blacklist the component. Do not enter zero or a negative number for the interval.
After expiring, the product’s SKUs no longer appear in the store’s catalog and cannot be purchased. To learn how to set expiration dates for individual SKUs along with replacements, see Replacement Products.
You can change the product visibility by entering a new expiration date and republishing the product.
Setting a Product as Draft
If desired, you can unpublish a product manually to set its status to draft. While a draft, the product’s SKUs no longer appear in the store’s catalog and cannot be purchased. This is useful when you want to edit a product without making your changes immediately available to end users. You can also unpublish products based on inventory levels using a low stock action. See Low Stock Action for more information .
Follow these steps to manually unpublish a product:
-
Open the Global Menu () and navigate to Commerce → Products.
-
Click a product.
-
Click the Actions button () next to the Publish button and select Convert to Draft.
-
Click OK to confirm.
This removes the product from your store’s catalog page so customers cannot view, purchase, or search for it.
If you have an approval workflow in place to publish products, you must go through it to publish the product again. If you want to remove the product from the storefront and publish it back again without going through the approval workflow, you can uncheck the Published checkbox and click Publish.
Commerce 2.1 and Below
Setting a Product as Expired
To expire a product,
-
Navigate to Control Panel → Commerce → Products.
-
Click on a product.
-
Uncheck the Never Expire checkbox on the Products Details tab. This configuration affects all the SKUs of the product.
-
Enter a future expiration date and time. All times are set using the GMT time zone.
-
Click Publish.
After making the changes, it may take some time to remove the product from the catalog, because the default check interval is 15 minutes. You change this by opening the Global Menu () and navigating to Control Panel → System Settings. Once there, go to Catalog → Products. Change the Check Interval value and click Save.
You can change the product visibility by entering a new expiration date and republishing the product.
Setting a Product as Draft
-
Navigate to Control Panel → Commerce → Products.
-
Click a product.
-
Click on Save as Draft.
You cannot search for the product or view it in the storefront after setting it to the draft status.
If you have an approval workflow in place to publish products, you must go through it to publish the product again. If you want to remove the product from the storefront and publish it back again without going through the approval workflow, you can uncheck the Published checkbox and click Publish.