Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Posts posted by Jonojamesmac

  1. I don't use prefixes either :)


    Copy/Paste this code into notepad and save it as code.php, upload it and run it. Let me know the outcome.

    function checkColumn($columnname, $tablename) {
     $columns = array();
     $table = $tablename;
     $query = 'SHOW COLUMNS FROM '.$table.';';
     if ($results = mysql_query($query)) {
      if (mysql_num_rows($results) > 0) {
    while($row = mysql_fetch_row($results)) {
     $columns[] = $row[0];
     if (in_array($columnname, $columns)) {
      return 1;
     else { return 0; } }
     $user = 'user_name';
     $admintable = 'administrators';
     $test = checkColumn($user, $admintable);
     if ($test == 1) { echo'OK - Admin Table Exists'; } else { echo'Not OK - Can\'t find the admin table'; }

  2. I'm actually testing using my broswer at the moment. Its being typed in all lowercase as it is supposed to be?


    What browser are you using?

    Safari will display as if its on the iPhone, try that and you have configured the config.php yes?

  3. Update uploaded - v1.2


    - Added login/logout functionality, log in with your admin username/password.

    - Remember me option

    - All customers orders will always appear on customers page.

    - Credit Card info moved to order page.

    - Optional CVC added

    - Removed images that were not needed.


    Please note: Remember Me option only works with the iPhone, iPod Touch cookies are currently broken.

  4. I've just implemented it onto my version on the iPod Touch, i also have acces to an iPhone and .htacces protection requires you to enter a username and password everytime you open the app.


    Once the username and password is entered, you don't need to re-enter until the app is opened again.


    You could you a cookie-based protection with that, saving the password for so many days..

  5. So, how do you keep anyone from navigating to this area on your server and viewing all of this info?


    What are all of the extra graphics for...in the images folder?


    The extra images came along with the iWebkit part of the app, they may come of use in the future.


    Protecting the area on your server is done by protecting the directory the contribution is in. The good thing about this contrib is that it doesn't have to be included in your shop directory, it can be placed anywhere on your server, and it can be accessed by a browser. If only you know the url then all is cool, but i understand that a username and password may be needed to protect it even more.


    The best method to protect the directory is via .htaccess for more information on that, click here

  6. V1.1 Uploaded - Changes below.


    - It is now possible to view credit card info if a customer has paid via your credit card input facilities. Note: Credit card info entered on your website is only included, 3rd Party credit card processors are not included.

    - Customer contact list has been added, similar to the layout of the iPhone/iPod Touch Contacts Application

    - Customers can now be contacted by SMS

    - Viewing a customer from the contact list will display all orders the customer has made.

    - Top Toolbar has navigation buttons for the new content.

    - Optional Model No has been added to the orders page, this may help if you catalogue your products via Model Number.

    - Reports Tool has been added, it is now possible to view the status of Products, Customers, Orders and the total amount in sales over current month, last month, current year and last year

    - Updated instructions to use SSL when using this App.(thanks Dave)

    - Index page is now index.php and not iphone.php


    This contribution has been uploaded as a completely new one, due to putting into wrong section. Awaiting to be manually added.

  7. Mmm, tested it out and when you do ("m")-1; it takes the 0 away from the month away, and doing so fails the mysql query.


    Change this at the top.


    $month = date("m")-1;
    if (($month == 10) || ($month == 11) || ($month == 12)) {
    $month = $month; }
    else {
    $month = '0' .$month; }
    $year = date("Y")-1;
    if ($month == 12) {
    $year = $year; }
    else {
    $year = date("Y"); }

  8. $month = date("m");
    $year = date("y");
    $sales_query_raw = "select SUM(ot.value)
    							   from " . TABLE_ORDERS . " o,
    							   " . TABLE_ORDERS_TOTAL . " ot
    							   where o.orders_id = ot.orders_id and ot.class = 'ot_subtotal' 
    								 and date_format(o.date_purchased, '%m')= '".$month."' 
    								 and date_format(o.date_purchased, '%y')= '".$year."'";
    $sales_query = tep_db_query($sales_query_raw);
    $sales = tep_db_fetch_array($sales_query);
    echo number_format($sales['SUM(ot.value)'],2);


    If you want to set it for a particular month change the $month variable to - 01-12 , as it is at the moment it takes the current month 04 into the variable and works from that.


    So for march:


    $month = '03';

  9. In unsubscribe.php and unsubscribe_done.php line 17-21



      if (isset($HTTP_GET_VARS['email'])) {
    $email_to_unsubscribe = ereg_replace('[^0-9A-Za-z@._-]', '', $HTTP_GET_VARS['email']); 
     } else {
    $email_to_unsubscribe = '';




      if (isset($HTTP_GET_VARS['email'])) {
    $email_to_unsubscribe = $HTTP_GET_VARS['email']; 
     } else {
    $email_to_unsubscribe = '';

  10. You could add a query after

    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {




    $image_query = "SELECT products_image from " . TABLE_PRODUCTS . " where products_id = ". $order->products[$i]['id']. ""; 
    		  $image_result = mysql_query($image_query)
    or die(mysql_error()); 
    $image = mysql_fetch_array($image_result);


    then call it along with the rest of the products with for example...


    <img src="' . HTTP_SERVER . '' . HTTP_CATALOG_SERVER . '' . DIR_WS_IMAGES. '' . $image['products_image'] . '" height="50" width="50" border="0"/>


    Let me know if it works, remember to add a header title for the image.

  11. in fact the whole thing is here


    $sales_query_raw = "select SUM(ot.value)
    							   from " . TABLE_ORDERS . " o,
    							   " . TABLE_ORDERS_TOTAL . " ot
    							   where o.orders_id = ot.orders_id and ot.class = 'ot_shipping' 
    								 and o.date_purchased >= date_add(curdate(), interval -1 month)";
    $sales_query = tep_db_query($sales_query_raw);
    $sales = tep_db_fetch_array($sales_query);
    echo number_format($sales['SUM(ot.value)'],2);

  12. Anyone have any idea on this? Would be really handy to know!





    $sales_query_raw = "select ot.value
    							   from " . TABLE_ORDERS . " o,
    							   " . TABLE_ORDERS_TOTAL . " ot
    							   where o.orders_id = ot.orders_id and ot.class = 'ot_subtotal' and o.date_purchased >= date_add(curdate(), interval -1 month)";

  13. iPhone/iPod Touch Web App for Oscommerce


    This web app for Oscommerce allows you interface with your shops orders, current features are:


    - View order list

    - View orders, including order status, products, attributes, total cost and custommer/order comments.

    - iWebKit has been incorporated to allow a smoother feel app

    - Views like a normal app from the Apple App Store

    - iPhone interaction, call or email a customer with a click of a button.

    - Google Maps Integration, find where your customer is in 1 click.

    - Customize it to how you want it.

    - And more...


    Please see the readme.txt file included for instructions on how to make it like a full app, as it just needs a few steps by you for it to work as intended. Because it is a web app this is needed.


    Download here...


    Just a note that i am just a beginner in the php world, and this was the first thing i've made that does work. The code could be cleaned up a lot but as i learn, i'll learn how to clean it up :)


    If you have any problems, i'll try to help in the best way possible.



  14. I've been struggling to find out as to why Paypal IPN was not updating orders table in the admin panel, for some unknown reason Paypal the checkout process isn't adding the order totals, to the order total table.


    Does anyone know why this is happening? Because no order total is being shown in the admin, the order will not appear. Inputting dummy info to the database made the order appear.


    I'd appreciate any help i can get with this, it is a pain having to check Paypal for what has sold on our website :(




    I'm using the latest version of IPN.