Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

in stock and out of stock


Guest

Recommended Posts

Hello

 

I have got oscommerce 2.3.1 installed

 

I have tried to find a in stock and out of stock text add on but cannot seem to find one that will just display on my product listings

 

for example if a product is in stock text will display in stock

 

if a product is out of stock text will display out of stock

 

Can anyone recommend a good add on for this please

 

Thank you

 

Ian

Link to comment
Share on other sites

do you want it just for backend?

 

or both backend and frontend?

 

if you want it just for backend then i can give you tiny solution.

 

find :

 

$contents[] = array('text' => '<br />' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br />' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity);

 

in categories.php page i think its on line no. 1045 or near about it.

 

replace with:

 

$contents[] = array('text' => '<br />' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br />' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity);

$contents[] = array('text' => ($pInfo->products_quantity > 0)?'<font size="+1" color="#00FF00"> In Stock </font>':'<font color="#FF0000"> Out of Stock </font>');

 

format color and text size as you want....

 

this is not an addon but i think it will help you..

Please take backup of your files before do changes suggested by me

Link to comment
Share on other sites

Hello vishalchauhan

 

I would like it for both backend and front end if possible

 

Thank you for your help

 

Really appreciate it

 

Ian

Link to comment
Share on other sites

Hi

 

go to backend -> configuration -> Stock

 

check for that values

 

Subtract stock .............................................true

Allow Checkout ..........................................true

Mark product out of stock .........................***

Stock Re-order level ..................................5

 

It shows in shopping cart page if product is out of stock it will display *** with product name.

 

for other pages i am finding..... as i'll find it i'ii reply you on this post...

Please take backup of your files before do changes suggested by me

Link to comment
Share on other sites

Thank you for the reply

 

Is there a possibility that this can be done for front end also

 

Thank you for the help and for looking for other pages if you find them

 

Ian

Link to comment
Share on other sites

Hello

 

I changed the code in the categories.php in the back end of the website and works perfect thank you so much

 

Is there any way that it can do the same thing but in the front end of the website

 

Really appreciate the help

 

Thank you

 

Ian

Link to comment
Share on other sites

Thank you Satish

 

I am looking at that now

 

Am I able to use my own stock buttons I have designed or does I have to use the ones that are included in the add on and also can I do the same for in stock but just change the coding for example

 

define('IMAGE_BUTTON_OUT_OF_STOCK', 'Out of Stock'); to define('IMAGE_BUTTON_IN_STOCK', 'In Stock');

 

AND

 

If ($product_info['products_quantity']<>0){

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

}else{

echo tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . 'outofstockbutton.gif', IMAGE_BUTTON_OUT_OF_STOCK);

 

else if

echo tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . 'instockbutton_.gif', IMAGE_IN_STOCK);

}

 

Would that work and if so is the coding correct as I am unsure if this bit is right

 

else if

echo tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . 'instockbutton_.gif', IMAGE_IN_STOCK);

}

 

Thank you for the help

 

Ian

Link to comment
Share on other sites

All contributions uploaded can be modified as far as My knowledge goes so it should not be an issue.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

I couldn't get it to work Satish so I gave up on it

 

I would still like to have a in stock button and out of stock button to appear on the product listing page or the product info page but I can't seem to get it to work

 

Can you help me please

 

Thank you

 

Ian

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...