Post by clivem » Sun Jan 29, 2023 8:18 am

Hi all,
using 2.3.0.2
I am looking to edit the text for stock status, currently stock >1 is 'In Stock' and Stock 0 or Less than Zero is 'Out of Stock'

I want to edit this so that if I input a -1 Qty that Stock Status will say 'Pre-Order'
I would also like to set stock zero - checkout not available - stock -1 or lower - checkout becomes available again as its now a preorder.

Can someone point me in the right direction?
Last edited by clivem on Tue Jan 31, 2023 5:55 pm, edited 1 time in total.

New member

Posts

Joined
Mon Jun 12, 2017 8:18 pm

Post by khnaz35 » Sun Jan 29, 2023 2:19 pm

clivem wrote:
Sun Jan 29, 2023 8:18 am
I am looking to edit the text for stock status,
Admin/system/localisation/stock statuses

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by clivem » Tue Jan 31, 2023 5:54 pm

Thanks for the reply, maybe i wasnt clear in my original post, I am looking to edit more than just the text / status .

Opencart only has 2 options or Triggers rather for showing statuses :
+ve values of stock as in stock, or Zero or -ve values as out of stock.

I want create a third trigger - i want to be able to enter a value of -1 and for the status to then be Pre-order

I also then want to be able to allow Store checkout when values are negative ( as they will now be on pre-order) . My store as default is set to not allow checkout on out of stock items as i dont want people buying out of stock items. However when i know i am getting specific items in i can set the value to -1 and set it to pre-order, then and only then will it again allow store checkout.

so for example

value 1 or higher - IN STOCK ( and this will allow store checkout)
Value 0 - OUT OF STOCK ( and no store checkout is allowed)
Value -1 or lower ( PRE_ORDER) and store checkout is allowed)

New member

Posts

Joined
Mon Jun 12, 2017 8:18 pm

Post by Nicolethomson » Wed Sep 13, 2023 1:26 pm

Hello,Modify the code that determines stock status to check for a quantity of -1 and display 'Pre-Order' accordingly. Adjust the checkout logic to enable checkout if stock is -1 or lower. This would likely involve changes in both the PHP backend and the template files. If you're not familiar with PHP or OpenCart's structure, I recommend hiring a developer or seeking help in OpenCart-specific forums. Always remember to back up your site and database before making any changes. TellTims Survey
Last edited by Nicolethomson on Thu Sep 14, 2023 11:50 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Sep 13, 2023 1:18 pm

Post by DigitCart » Wed Sep 13, 2023 5:37 pm

Hi
I have this extension which allows you to show a custom stock status instead of the default "In Stock" text when the product is in stock.
It does not work exactly like you described, Because if you set the quantity to a negative number, The product will be considered out of stock.
But instead of using a negative number in the quantity field, You can choose a custom stock status for that product manually.

Please check its demo:
https://www.opencart.com/index.php?rout ... n_id=38198

My Extensions


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm

Who is online

Users browsing this forum: No registered users and 67 guests