If this is your first visit, check our documentation. To post, register or login.

Availability on Stock

Started by tjecco on 4 Nov 2011, 10:27 AM · Views: 1,090

Results 1 to 10 of 10
4 Nov 2011, 10:27 AM
#1
tjecco avatar

tjecco

New Zenner

Join Date:
Nov 2011
Posts:
3
Plugin Contributions:
0

Availability on Stock

Hi

I need to be able to show the Availability on the stock we sell from our suppliers

I found this add on for osCommerce
http://www.oscommerce.com/community/contributions,4948

But i'm not sure if there is one for zencart as well

Need to be able to set it like this
"Availability: in stock, usually ships in 2-3 days"

thank you

14 Nov 2011, 9:26 AM
#2
tjecco avatar

tjecco

New Zenner

Join Date:
Nov 2011
Posts:
3
Plugin Contributions:
0

Re: Availability on Stock

Is there no way this can work on Zencart

14 Nov 2011, 12:57 PM
#3
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Availability on Stock

Yes, most probably. But you would need to find someone to convert it to Zen Cart. There is no reason why it should not work, or that you can reproduce the functionality quite easily. Howver, if you want that to work on Zen it is going to need to be coded for Zen and that will take some php knowledge.

Nick
iszent.com

18 Nov 2011, 8:55 AM
#4
tjecco avatar

tjecco

New Zenner

Join Date:
Nov 2011
Posts:
3
Plugin Contributions:
0

Re: Availability on Stock

Thank you

Now i need to find someone to rewrite it in Zen

Anybody willing to help :laugh:

18 Nov 2011, 12:31 PM
#5
coffeecanada avatar

coffeecanada

New Zenner

Join Date:
Oct 2011
Location:
Toronto
Posts:
30
Plugin Contributions:
0

Re: Availability on Stock

Working on this right now.

18 Nov 2011, 12:47 PM
#6
coffeecanada avatar

coffeecanada

New Zenner

Join Date:
Oct 2011
Location:
Toronto
Posts:
30
Plugin Contributions:
0

Re: Availability on Stock

Here:```php
<strong>Availability:</strong> <?php if ($products_quantity > 0) { echo "In Stock"; } else { echo "Not In Stock"; } ?><br />


Drop that into whereever you want it displayed on tpl_product_info_display.php

Note that if the quantity remaining is 1 unit and they try to order 5 units, ZenCart will probably throw an error when they try to add to cart. This is a simple "In Stock" or "Not In Stock" display.

I put my "Usually ships in 24hours, shipping time 3-5 days" in another line below it. I've recently changed this to:
```php
<strong>Shipping Time:</strong> Order today and receive by <?php echo date("Y/m/").(date("d")+7); ?><br />

Since I figure it's more useful to customers. The only "problem" is that you have to ensure it does arrive in 7 days.
Also note that the code isn't complete - it'll display 2011/11/37 if today was November 30th.

18 Nov 2011, 1:29 PM
#7
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Availability on Stock

I think that the point is that there may be different delivery times for each product. Or, that is how I read it originally. And that is certainly what the osCommerce module does.

In which case you need to store that information in the database for each product which makes the coding just a bit more complex than that :-)

Having said that this will work for lots of people so that is all good.

Nick
iszent.com

18 Nov 2011, 5:18 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Availability on Stock

Try this:```php
<strong>Shipping Time:</strong> Order today and receive by <?php echo date("Y/m/d", time()+604800); ?><br />

Gives the date for (now + one week, expressed in seconds).
23 Nov 2011, 7:13 PM
#9
coffeecanada avatar

coffeecanada

New Zenner

Join Date:
Oct 2011
Location:
Toronto
Posts:
30
Plugin Contributions:
0

Re: Availability on Stock

gjh42:

Try this:```php
<strong>Shipping Time:</strong> Order today and receive by <?php echo date("Y/m/d", time()+604800); ?><br />

> Gives the date for (now + one week, expressed in seconds).
Thank you sir - I didn't know the date() function could do that!