Guest Posted December 7, 2003 Share Posted December 7, 2003 Thanks in advance. I am looking for a way to mark everything 30% off with an expiry date. I am currently using the specials.php in the admin to accomplish this, With a large product base this is going to take a long time. Anyone have any thoughts on this? Link to comment Share on other sites More sharing options...
k_budiarto Posted December 7, 2003 Share Posted December 7, 2003 you can do this easily in your SQL database. simply extract all the products id out from your products table, edit with notepad to confer with your specials table, and run "insert into" SQL statements into your specials table (preferably using phpmyadmin). Link to comment Share on other sites More sharing options...
chfields Posted December 7, 2003 Share Posted December 7, 2003 You can also go to the contribs and get quick price updates and install Link to comment Share on other sites More sharing options...
blueline Posted December 7, 2003 Share Posted December 7, 2003 Hey Al. Here ya go. Copy this php code and place it in your admin folder. Then simply change the expiration date from the code to whatever day you want, and run the code. Copy the output and then place it into phpMyAdmin under the SQL tab. All done. HTH, -Chris <?php require('includes/application_top.php'); $expiration_date = '2003-12-17 18:32:54'; $products_query = tep_db_query('select products_id, (products_price * .70) as special_price from ' . TABLE_PRODUCTS . ' order by products_id asc'); while ($products = tep_db_fetch_array($products_query)) { echo "INSERT INTO `specials` ( `specials_id` , `products_id` , `specials_new_products_price` , `specials_date_added` , `specials_last_modified` , `expires_date` , `date_status_change` , `status` ) VALUES ( '', '" . $products['products_id'] . "', '" . $products['special_price'] . "', 'now()', 'now()', '" . $expiration_date . "', 'now()', '1' );<br>"; } ?> Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted December 8, 2003 Share Posted December 8, 2003 Thanks guys. Now to see why my email did not let me know you posted. Link to comment Share on other sites More sharing options...
blueline Posted December 8, 2003 Share Posted December 8, 2003 Al, I've been having the same problem. It's really annoying. Chris Sullivan Link to comment Share on other sites More sharing options...
Guest Posted December 12, 2003 Share Posted December 12, 2003 not sure either, just no mail, Hey Chris, this would make a great contribution if all the details were worked out, Admin would just tnere the discount amount, program does the rest. Link to comment Share on other sites More sharing options...
blueline Posted December 12, 2003 Share Posted December 12, 2003 Al- I'll put it together tomorrow. -Chris Chris Sullivan Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.