chrometweaks.org

The Ultimate Grand Daddy of web hosting (iPage hosting reviews)?

Click Here To View All Answers...


Quick question: The Ultimate Grand Daddy of web hosting (iPage hosting reviews)? Many thanks for any answer. Another question... Hi there,.

I've had a search of the forums, but my searching abilities may be letting me down..

Is there a way of adding items to OSC so that they don't appear in the "New Products for (this month)" section - i.e. to add back stock that's not new but needs to be in the system?.

I simply tried selecting a date that was in the past using the built in Calendar selector - but didn't work that way..

Is there a way of doing this, or a Contribution to help? Rather than having to manually alter everyone each time, in the database itself (e.g. PHPMyAdmin)?.

Cheers,.

Juju..

Comments (108)

That's a good question. I'm not sure what is the answer to that question. I'll do some research in Google and get back to you if I find an useful answer. You should email the people at iPage as they probably can answer it..

Comment #1

Neat..

Would be cool if there were some kind of option in the admin/tools section to deal with that..

Juju..

Comment #2

This code will give you two radio buttons on the product input page so you can say whether the product is new or old..

In the products table set the default value for the field products_date added to '1995-11-25 00:31:30'..

In admin/categories.php.

Change:.

If ($action == 'insert_product') {.

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);.

To:.

If ($action == 'insert_product') {.

$products_age = tep_db_prepare_input($HTTP_POST_VARS['products_age']);.

If ($products_age == True).

{.

$insert_sql_data = array('products_date_added' => 'now()');.

}.

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);.

Add:.

<tr>.

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>.

</tr>.

<tr>.

<td class="main"><?php echo 'New or Old ?'; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_radio_field('products_age', '0', $out_age)'&nbsp;''Old''&nbsp;'tep_draw_radio_field('products_age', '1', $in_age)'&nbsp;''New'; ?></td>.

</tr>.

Under:.

<tr>.

<td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_radio_field('products_status', '1', $in_status)'&nbsp;'TEXT_PRODUCT_AVAILABLE'&nbsp;'tep_draw_radio_field('products_status', '0', $out_status)'&nbsp;'TEXT_PRODUCT_NOT_AVAILABLE; ?></td>.

</tr>.

Add:.

$in_age = true;.

Under:.

Case '0': $in_status = false; $out_status = true; break;.

Case '1':.

Default: $in_status = true; $out_status = false;.

}.

This post has been edited by.

Yesudo.

: 22 August 2004, 22:09..

Comment #3

Actually - in the above change:.

<tr>.

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>.

</tr>.

<tr>.

<td class="main"><?php echo 'New or Old ?'; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_radio_field('products_age', '0', $out_age)'&nbsp;''Old''&nbsp;'tep_draw_radio_field('products_age', '1', $in_age)'&nbsp;''New'; ?></td>.

</tr>.

To:.

<?php if (!isset($HTTP_GET_VARS['pID'])).

{ ?>.

<tr>.

<td class="main"><?php echo 'New or Old ?'; ?></td>.

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15')'&nbsp;'tep_draw_radio_field('products_age', '0', $out_age)'&nbsp;''Old''&nbsp;'tep_draw_radio_field('products_age', '1', $in_age)'&nbsp;''New'; ?></td>.

</tr>.

<?php } ?>.

This post has been edited by.

Yesudo.

: 22 August 2004, 22:29..

Comment #4

The above is best used in conjunction with:.

Http://www.oscommerce.com/community/contri...l/search,emmett..

Comment #5

This looks very good. thank you!.

Before I try - could you tell me if this still allows me to use the "future date" calendar, i.e. it won't interfere with any 'Products Expected' listing?.

Cheers!.

Juju..

Comment #6

Should be fine as they work off, of different fields in the table...

Comment #7

Thanks!.

This works really well. The only slight thing is that when I follow the current Contribution version (MS WORD doc) I get a doubling up of the old/new? radio buttons on the contribution page!.

Cheers,.

Juju..

Comment #8

Sorry, I meant categories.php page, when entering a new (or old) item..

Juju..

Comment #9

I have done this on a couple of stores now without that issue. are you on ms1 or ms2 ?

Comment #10

Hi there,.

I've had a search of the forums, but my searching abilities may be letting me down..

Is there a way of adding items to OSC so that they don't appear in the "New Products for (this month)" section - i.e. to add back stock that's not new but needs to be in the system?.

I simply tried selecting a date that was in the past using the built in Calendar selector - but didn't work that way..

Is there a way of doing this, or a Contribution to help? Rather than having to manually alter everyone each time, in the database itself (e.g. PHPMyAdmin)?.

Cheers,.

Juju..

Comment #11

Try:.

Update products set products_date_added = '1995-11-25 00:31:30' where products_date_added > '2004-08-21 00:31:30'.

First date above is arbitary.

Second date above should be set to a time just prior to when you start adding old stock - and the query should be run after you have finished adding old stock..

This post has been edited by.

Yesudo.

: 22 August 2004, 19:48..

Comment #12


This question was taken from a support group/message board and re-posted here so others can learn from it.