Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Availability


surfalot
 Share

Recommended Posts

First of all, great contribution! very useful to me and lots of others, obviously. I have couple issues getting to work as perfectly with my site however.

 

First problem: When I try to edit the availability options in admin I get the following error:

 

Fatal error: Call to undefined function tep_hide_session_id() in /admin/availability_options.php on line 194

line the error is refering to is:

$contents[] = array('form' => tep_draw_form('availability', FILENAME_AVAILABILITY_OPTIONS, 'page=' . $HTTP_GET_VARS['page'] . '&aID=' . $availability_id . '&action=save') . tep_hide_session_id() );

 

If I try to delete an option I get:

 

Fatal error: Call to undefined function tep_hide_session_id() in /admin/availability_options.php on line 221

line the error is refering to is:

$contents = array('form' => tep_draw_form('availability', FILENAME_AVAILABILITY_OPTIONS, 'page=' . $HTTP_GET_VARS['page'] . '&aID=' . $_GET['aID'] . '&lID=' . $_GET['lID'] . '&action=deleteconfirm') . tep_hide_session_id() );

 

I not sure this is something I have coded wrong or left out because before I changed anything I uploaded the availability_configurer.php to view it I got (and still get) the error below - this file seems to work as it should btw even with the error:

Fatal error: Call to undefined function tep_hide_session_id() in /admin/availability_configurer.php on line 388

line the error is refering to is:

'<br> ' . tep_hide_session_id() .  tep_draw_input_field( /* $name */ 'submit', /* $value */ TEXT_CONFIG_PROCESS, /* $parameters */ '', /* $required */ false, /* $type */ 'submit', /* $reinsert */ false) . '<br><br><br>'."\n" .

 

Anyone had these errors before?

 

Second problem: How do I can the style of text the availability messages are displayed in product description and shopping cart? Ideally I like to have a small icon next to the text (red cross if its out of stock green tick if in stock) but I would just be happy to have the text in class="Main".

Any help appreciated. Thanks, David.

Link to comment
Share on other sites

  • Replies 129
  • Created
  • Last Reply

Top Posters In This Topic

^^^^^

I have solved the "Fatal error: Call to undefined function tep_hide_session_id(" problems by uploading an older version on availability_options.php, the one from Version 1 - 1 Mar 2007

 

I'll still looking for help for changing the text style on product_info and shopping_cart though.

Link to comment
Share on other sites

^^^^^

 

 

I'll still looking for help for changing the text style on product_info and shopping_cart though.

 

I am not very good in php, but you could try to modify this code. It works separately from this contribution. If you have two products in your shopping cart - one is already in stock, the other will be available in a week, it shows no message for the first one and "item in stock:" and date for the second one.

 

in shopping_cart.php find

 

$products_name .= $stock_check;
       }
     }

 

add bellow:

// show availability

$products_query = tep_db_query("select products_date_available from " . TABLE_PRODUCTS . " p where products_id = '" . $products[$i]['id'] . "'");
$product_fetch = tep_db_fetch_array($products_query);
$products_descript = $product_fetch['products_date_available']; 			 
if 	($products_descript > date('Y-m-d H:i:s')) {
$products_name .= '<br>Item in stock: <small> ' . $products_descript . '</small>';
}					
// show availability

 

it is just slightly modified code from description in cart contribution.

Link to comment
Share on other sites

  • 2 weeks later...

thanks for the reply Jitty25 but I have sort of solved the problem by crateing an image for each out of stock item and removed the text as it now within an image.

 

Another thing I am desperate to do is to get the availability status on the product listing. Anyone know how to do this?

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...