Jump to content
Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by burt

  1. http://www.oscommerce.com/community/contributions,475
  2. burt

    Different layout after default 1st page?

    No, it's fairly simple, you just need to decide how you want to the pages to look (as you have done already) and then learn enough PHP/HTML to actually go into the code of each page/script and start to hack it around to your liking... It does take quite a long time to become confident enough to actually do it, but its a great sense of achievement when you do.
  3. If I had the time to spare I would code it up - (un)fortunately paying webdesign clients come first as they put bread onto the table... bummer aint it?
  4. Set a print CSS stylesheet. Voila. http://www.htmlgoodies.com/beyond/css_print.html HTH, nice easy solution, particularly if you can also set up an "admin" page where the user can say; lets print category A, category C and category H. Or whatever. Or all of them. Maybe in tickboxes ?
  5. Amend the products table to show your new fields. Amend the adding products scripts in Admin to show your new fields, amend the .sql to add in the posted variables. Amend the product view and product edit switch(es) to be able to update the records. Amend the product_info.php to show your new fields in an organised manner. Not difficult. Time consuming though.
  6. burt

    Bank Transfer Payment Option

    Sort code, is the Banks "number" - every branch of every bank has a unique Sort Code... This is likely a UK only thing though...
  7. customers.customers_id is what you want isn't it ?
  8. Nice sets. Thank you. Could someone compile a list of all the buttons needed to complete a set - when I have a spare bit of time I can get making some also...
  9. burt

    helpdesk problem

    define the FILENAME_HELPDESK_SUBMIT in application_top.php: define('FILENAME_HELPDESK_SUBMIT', 'whatever_name.php');
  10. burt

    Must agree to terms

    What you are saying with this: if ($HTTP_POST_VARS['agree'] != 1) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('SOME ERROR MESSAGE, or put in language file'), 'SSL')); } is; if the value of the POST'd variable "agree" is NOT 1, then ERROR out. So you need to make sure that if the checkbox is ticked it gives a value of 1. So my question to you is; Does your checkbox assign a value=1, thus: <input type="checkbox" name="agree" value="1"> If thats the way you have coded it, you have likely used the TEP function but its the same principle.
  11. Always interested in Button Sets - please do contribute them.
  12. burt

    Script for Product-Image insert

    There are at least 3 "default image" hacks posted within these forums, it is simply a matter of searching for them. As for using PHPmyAdmin: UPDATE `products` SET `products_image` = 'NAME_OF_IMAGE.jpg' WHERE `products_image` = '' Change the necessary fields. To change them to match the products_model field, this would take a little more thinking about, but seems fairly straightforward. If you have a budget for doing this, someone here can help I have no doubt. If you have no budget then you either need to learn PHP/SQL and start coding (as many others have done) or wait until somebody who does know PHP wants/needs the same functionality and then hope they contribute the script they made...or some kind soul might just spend the time to make a script and contribute anyway... For best results and satisfaction, try giving it a go yourself.
  13. burt

    Dump Inactive Customers?

    <? function make_time($datetime) { $yr = substr($datetime,0,4); $mon = substr($datetime,4,2); $day = substr($datetime,6,2); $hr = substr($datetime,8,2); $min = substr($datetime,10,2); $sec = substr($datetime,12,2); return mktime($hr,$min,$sec,$mon,$day,$yr); } echo make_time('2002-06-14 15:50:56'); // Put your date in here ?> Also have a look at http://www.mysql.com/doc/en/DATETIME.html which would be a better way to do it IMO...all this taken from www.php.net/date HTH
  14. burt

    Dump Inactive Customers?

    The problem here is that last login is something like: 2002-06-14 15:50:56 So you would need to convert that to a Unix timestamp (a), then change todays date into a unix timestamp(B) and delete 15552000 (approx 6 months in seconds) off it©. If © is less than (a) then delete the customer. Nightmare. HTH
  15. burt

    New Plug in Idea

    Here is my thoughts: - make a new contact form with the necessary fields (name, email, comments, book title, isbn number etc) - person fills it in and presses submit. - store owner receives an email with this info on it. - info is also written to a new table in the database - a new page is drawn which lists all of the requested books automatically, and maybe an estimation of when the book will be available (eg 3 weeks, 1 month, etc) - when book is in stock a quick email to the customer and he comes back to your site and signs up, buys it and there we are. Sounds straightforward to me.
  16. burt

    Coding Help

    if(!$result = mysql_query("INSERT INTO table (email) VALUES ('email')")) { $message = "<p>You were not added:</p>"; if (mysql_errno()==1062) { $message .= "<p>The Email Address <b>$email</b> already exists!!!!</p>"; } echo $message; exit; Let MySQL do the error checking for you!
  17. Error at my end - my regional settings required a slight change and now it's looking good... I'm going to spend a fair bit of time with this tomorrow, so I'll report back if I find any errors or amend/update anything... This is a great contrib, kudos to both you and Dynamok.
  18. Agreed, that is a fantastic little mod, many thanks Elari.
  19. Took out the references to "excel.php" and replaced with $PHP_SELF. It works now...the created CSV file doesn't seem to like my Excel 2000 program, all the columns look very weird. Willl have a play with it and report back. Good work, thank you.
  20. Tells you that the function osc_trunc_string() as required in the script /includes/modules/featured.php cannot be found. What you need to do is open /includes/functions/general.php and add: function osc_trunc_string($str="",$len=150,$more=1) { if ($str=="") return $str; if (is_array($str)) return $str; $str = trim($str); // if it's les than the size given, then return it if (strlen($str) <= $len) return $str; // else get that size of text $str = substr($str,0,$len); // backtrack to the end of a word if ($str != "") { // check to see if there are any spaces left if (!substr_count($str," ")) { if ($more) $str .= "..."; return $str; } // backtrack while(strlen($str) && ($str[strlen($str)-1] != " ")) { $str = substr($str,0,-1); } $str = substr($str,0,-1); if ($more) $str .= "..."; } return $str; }
  21. Sounds Excellent. I have put yours in and get an error about cannot find excel.php...I think i'm being a bit dumb, but do we need Dynamoks contribution installed as well as yours ?
  22. burt

    Featured Products v1.3

    What version of MySQL are you running ?
  23. Thats not a simple mod I'm afraid. I can find some time to take a look maybe after Xmas, as I'm covering for three jobs at the moment due to extended sick leave for my colleague...
  24. That script is very simple. Another idea would be to amend the script slightly to make product_status = 5 (or any number other than 1 or 0) Then you can do a simple page to draw out all the products that have a status of 5, put a checkbox next to each. Check it to change product_status from 5 to 1 (or leave unchecked of course), press update. Voila. Checked products now have a product_status = 1 are now publically viewable... Simple. ;)
  25. http://forums.oscommerce.com/viewtopic.php?t=27140