Post by soamjena » Wed Feb 14, 2018 11:09 pm

Lets say, a product stock is set in backend as 10.
Now, lets say 10 sales have happened.
The product on frontend should show out of stock automatically.

But its not happening and still add to cart shows up. ??? ??? ???

User avatar
Active Member

Posts

Joined
Mon Feb 13, 2012 3:35 pm

Post by kestas » Thu Feb 15, 2018 3:05 am

Maybe you forget in Admin dashboard, Catalog> products>data tab, set the Subtract Stock to yes...

Custom OpenCart modules and solutions. Just PM me... Extensions you can find here and here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by wid » Thu Feb 15, 2018 5:18 am

yes it does not work properly
you can add it to your basket with a Success message :
"You have added foo product to your shopping cart!"
but when you go to your basket or check out you see an error message:
"Products marked with *** are not available in the desired quantity or not in stock!"

take a visit to My Modules !


wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by soamjena » Thu Feb 15, 2018 4:15 pm

kestas wrote:
Thu Feb 15, 2018 3:05 am
Maybe you forget in Admin dashboard, Catalog> products>data tab, set the Subtract Stock to yes...
Subtract Stock to yes is done for all, but it doesnt work :(

User avatar
Active Member

Posts

Joined
Mon Feb 13, 2012 3:35 pm

Post by wid » Thu Feb 15, 2018 4:39 pm

before the price of the product it says
Availability: Out Of Stock

if you want to change text of "add to cart" button you have to do it with an extention-an event that change this text to "sold out" for example.

for example in product page with a triger before call the view 'catalog/view/product/*/before'
you have to change the value of $data['button_cart'] to what $product_info['stock_status']; is

the simplest solution but not the best practice is to modify with ocmod the
file: catalog/controller/product/product.php -line 245
after: if ($product_info['quantity'] <= 0) { add
$data['button_cart']='Out of stock or sold out';

of course, you have to do similar work to all the pages that shows products

take a visit to My Modules !


wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by soamjena » Fri Feb 16, 2018 12:46 am

The problem is, the stock still shows IN STOCK green and able to checkout.

Seems the auto subtract stock is not working.

User avatar
Active Member

Posts

Joined
Mon Feb 13, 2012 3:35 pm

Post by Qphoria » Fri Feb 16, 2018 3:27 am

Stock subtraction only happens when the order that contains the product is succesfully updated to a "processing" or "completed" status from a non-processing status. So for example when the item goes from "new" to "Processing", it will subtract from stock

Also note that you will want your final status to be checked in the "Completed" status list. For example, if you have "Completed" as the only completed status, but then change the order status to "Shipped" on the order, it will actually restore the stock.

Additionally, you have to set the "Allow stock checkout" to "False" in the system settings for it to subtract and show out of stock.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by soamjena » Fri Feb 16, 2018 9:38 pm

yes my order is completed, still its not substracting :(

User avatar
Active Member

Posts

Joined
Mon Feb 13, 2012 3:35 pm

Post by Ninjas-Everywhere! » Mon Feb 26, 2018 7:07 am

I'm having the same problem. I'm on v3.0.2 and I had my first order come through and I had gone in to the order and marked it as "Complete". The Quantity for that item was not subtracted either. It's still the same Quantity as originally put in.


Posts

Joined
Wed Feb 14, 2018 3:04 am

Post by straightlight » Mon Feb 26, 2018 9:19 am

Have you chose to subtract the item from your admin - > catalog - > products - > data tab and also on your product options page before the stock status could get affected on your next order?

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Ninjas-Everywhere! » Mon Feb 26, 2018 10:31 am

Yes. This was done in the initial setup of the physical products to be shipped or picked up at the location. I have some products that are memberships and those are set to NOT subtract from stock.


Posts

Joined
Wed Feb 14, 2018 3:04 am

Post by soamjena » Mon Feb 26, 2018 5:55 pm

straightlight wrote:
Mon Feb 26, 2018 9:19 am
Have you chose to subtract the item from your admin - > catalog - > products - > data tab and also on your product options page before the stock status could get affected on your next order?
I see it only in one place, subtract stock.
Is there a 2nd place also to switch it on ?

User avatar
Active Member

Posts

Joined
Mon Feb 13, 2012 3:35 pm

Post by wid » Mon Feb 26, 2018 7:00 pm

there is in two places if you have (select or radio or checkbox) options on a product
catalog>products>option

take a visit to My Modules !


wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by Ninjas-Everywhere! » Fri Mar 02, 2018 5:35 am

In my case, I do not have any Option setup for my product. I had even gone and enabled the option to Display Stock in the store setup, then verified the stock of that item from another browser. The Subtract Stock isn't working.


Posts

Joined
Wed Feb 14, 2018 3:04 am

Post by Ninjas-Everywhere! » Fri Mar 02, 2018 7:14 am

My issue is resolved. For what ever reason it wasn't updating. I had went from Processing to Complete on the order and it wasn't working. I went back to the order put it back in to Processing, then went Processed, then Shipped, then Complete. This time, as soon as I changed it to Shipped, the Stock adjusted.This particular item was an In-Store Pickup item and didn't have shipping. I'll have to see what happens on the next order.


Posts

Joined
Wed Feb 14, 2018 3:04 am
Who is online

Users browsing this forum: No registered users and 25 guests