Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-7142

Low Inventory Alert section out of date

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: No Longer Reproducible
    • Fix Version/s: Commerce 2.0
    • Component/s: Commerce
    • Labels:
      None
    • Type of Documentation:
      Developer: Reference

      Description

      The dev guide article about handling low stock inventory is out of date, it refers to a class that appears to have been replaced.  

      Old: 

      @Override
      public void execute(CommerceWarehouseItem commerceWarehouseItem)
      	throws PortalException {
      
      	CPInstance cpInstance = commerceWarehouseItem.getCPInstance();
      
      	if (cpInstance.isPublished()) {
      		cpInstance.setPublished(false);
      
      		_cpInstanceLocalService.updateCPInstance(cpInstance);
      	}
      }
      

      New:

       @Override
          public void execute(CPInstance cpInstance) throws PortalException {
      
              if (cpInstance.isPublished()) {
                  cpInstance.setPublished(false);
      
                  _cpInstanceLocalService.updateCPInstance(cpInstance);
              }
          }
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                Commerce 2.0