X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Displaying Quantity in Stock (https://forum.x-cart.com/showthread.php?t=77862)

johngwms 06-14-2020 06:09 AM

Displaying Quantity in Stock
 
I want to be able to display the current stock level of each product.

I don't seem to be able to find a setting for this.

I also want to display some custom text (per product) which indicates the lead time for shipping out of stock items.

Have I missed it?

cflsystems 06-14-2020 07:15 AM

Re: Displaying Quantity in Stock
 
Quote:

Originally Posted by johngwms
I want to be able to display the current stock level of each product.



This is stock. If it is not showing then it has been suppressed in your theme. See the demo store - https://demostore.x-cart.com/perfect-snacks


Quote:

Originally Posted by johngwms
I also want to display some custom text (per product) which indicates the lead time for shipping out of stock items.



You can use https://market.x-cart.com/addons/backorder-preorder.html

johngwms 06-14-2020 07:41 AM

Re: Displaying Quantity in Stock
 
Thanks Steve. It seems I did not have the settings correct.

On my previous store (XC4) I also displayed a line of custom text where I indicated the lead time for out of stock all the time, not just when the items became out of stock. Customers found this useful when they wanted to order more items that I currently have in stock.

Is that possible with the current functionality of the module?

cflsystems 06-14-2020 07:56 AM

Re: Displaying Quantity in Stock
 
I believe the backorder module will only show the message if product is out of stock and set to be available for backorder. But you can modify this behavior.
However if you only want to show a message and not actually allow for backorder out of stock products it's probably best to just have a custom module to add message to each product and show it on the page. Just as informational field nothing else.
You can add this a an attribute and will show if not empty but will show under spects tab not where the quantity is.

siddharth.puri@wheelandba 07-09-2020 06:22 PM

Re: Displaying Quantity in Stock
 
Expanding on Steve's reply, use this to add a property field for each product https://devs.x-cart.com/basics/adding_new_property_to_a_product/

Then you can add the lead time for the product to display it in the front end for the customer.

johngwms 07-09-2020 11:20 PM

Re: Displaying Quantity in Stock
 
Thanks Siddharth.

I will need to study this guide carefully. At the moment, it is almost unreadable because there is no clear explanation of what is needed and going on.

Ed B. 07-10-2020 05:59 AM

Re: Displaying Quantity in Stock
 
Quote:

Originally Posted by johngwms
Thanks Siddharth.

I will need to study this guide carefully. At the moment, it is almost unreadable because there is no clear explanation of what is needed and going on.



Don't worry too much about the theory for writing the module, you can just grab it and install. You will certainly have to modify my_message.twig, but check it out on your dev-store to see what it does, then you will know what you will have to change.


All times are GMT -8. The time now is 10:51 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.