Jump to content

Jan Zonjee

Team
  • Content count

    7,003
  • Joined

  • Last visited

  • Days Won

    12

Reputation Activity

  1. Like
    Jan Zonjee got a reaction from Smoky Barnable in apostraphe casuing error in product name for search queries   
    Probably, this contribution does not use the osC way of doing an insert (using function tep_db_perform in includes/functions/database.php) and therefore it doesn't put a backslash in front of the apostrophe, therefore MySQL sees it as the end of the string and when it sees the next apostrophe: error.The function tep_db_perform adds slashes in this line:

    default: $query .= '\'' . tep_db_input($value) . '\', ';
    where tep_db_input does the addslashes (a PHP function):

    function tep_db_input($string) { return addslashes($string); }
  2. Like
    Jan Zonjee got a reaction from alax in UPS XML module broken?   
    And then 1.3.6 is around the corner :) (just bug fixing the above exec issue and some other small things).
     
    Crazy error anyway because in 1.2.6 the function _parseResult is on line 915-984. Perhaps your upsxml.php file got damaged?
  3. Like
    Jan Zonjee got a reaction from joli1811 in Paypal App - Incorporation of mods in new admin/orders.php   
    Sounds like the best option. Haven't tried this so just writing queries from what I remember of them :-) :

    admin/classes/order.php around line 30: function query($order_id) { global $languages_id; $order_id = tep_db_prepare_input($order_id); $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); $order = tep_db_fetch_array($order_query); // BOF SPPC $customer_group_query = tep_db_query("select cg.customers_group_name from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg on c.customers_group_id = cg. customers_group_id where c.customers_id = " . $order['customers_id'] . " "); $customer_group_info = tep_db_fetch_array($customer_group_query); // EOF SPPC and then later (around line 71 now): 

    $this->customer = array('id' => $order['customers_id'], 'name' => $order['customers_name'], 'company' => $order['customers_company'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => array('title' => $order['customers_country']), 'format_id' => $order['customers_address_format_id'], // BOF SPPC 'customers_group_name' => $customer_group_info['customers_group_name'], // EOF SPPC 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address']);
  4. Like
    Jan Zonjee got a reaction from tgely in [Contrib] Admin Specials by Categories for SPPC   
    Me too. First of all you seem to have a problem with Separate Pricing Per Customer (SPPC) instead of Admin Specials by Categories for SPPC. SPPC has its own support thread. 
    Secondly, you post code that resembles code of SPPC in catalog/includes/classes/shopping_cart.php but which is missing pieces and also end tags for comments.
    It is therefore not a miracle that you are getting these errors.
     
    Can't you use the file that came with the contribution? Or do you use other contributions that make changes to that file?
  5. Like
    Jan Zonjee got a reaction from tgely in [Contrib] Admin Specials by Categories for SPPC   
    The files can be found in the contribution section (contribution number 3366), Features section.
  6. Like
    Jan Zonjee got a reaction from joli1811 in Paypal App - Incorporation of mods in new admin/orders.php   
    Sounds like the best option. Haven't tried this so just writing queries from what I remember of them :-) :

    admin/classes/order.php around line 30: function query($order_id) { global $languages_id; $order_id = tep_db_prepare_input($order_id); $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); $order = tep_db_fetch_array($order_query); // BOF SPPC $customer_group_query = tep_db_query("select cg.customers_group_name from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg on c.customers_group_id = cg. customers_group_id where c.customers_id = " . $order['customers_id'] . " "); $customer_group_info = tep_db_fetch_array($customer_group_query); // EOF SPPC and then later (around line 71 now): 

    $this->customer = array('id' => $order['customers_id'], 'name' => $order['customers_name'], 'company' => $order['customers_company'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => array('title' => $order['customers_country']), 'format_id' => $order['customers_address_format_id'], // BOF SPPC 'customers_group_name' => $customer_group_info['customers_group_name'], // EOF SPPC 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address']);
  7. Like
    Jan Zonjee got a reaction from Tezla in [Contribution] Upgrading osC from 2.2 MS2 to 2.2 RC2a   
    This is the support thread for the "Upgrading osC from 2.2 Milestone 2 to 2.2 RC2a" contribution (addon #6654).
     
    This contribution documents and describes the changes to update a osCommerce 2.2 milestone 2 shop to the latest version (release candidate 2a).
     
    This is useful for example in case your hosting upgraded MySQL to version 5, PHP to version 5, decided to set register globals to off or you want to implement the latest bugfixes and security fixes.
  8. Downvote
    Jan Zonjee got a reaction from TruckloadSales in Error with UPS XML Modeule   
    How about reading the install instructions that came with the module? The error is mentioned in there (plus the support thread for this contribution which you also missed).
  9. Like
    Jan Zonjee got a reaction from Peper in Seperate Pricing Per Customer v3.5   
    If this is adding a new attribute you could add code to also be able to hide attributes from groups. If you don't you shouldn't use "0" for the value. The default is the at symbol: @. Since it is the default for the column value you should be able to use:
     

    $price_prefix = tep_db_prepare_input('+'); // $attributes_hide_from_groups = tep_db_prepare_input('0'); tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', NULL); } // END OF THIS MODULE
  10. Like
    Jan Zonjee got a reaction from Peper in Losing oscid in admin section   
    I do believe there is something wrong with the setting of cookies then in your admin section. But even then it can be fixed by adding the session id to get based forms. You will find examples in e.g. admin/categories.php (note the echo tep_hide_session_id()):
     

    <?php echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); echo tep_hide_session_id() . '</form>'; ?>
  11. Like
    Jan Zonjee got a reaction from Peper in Losing oscid in admin section   
    Search for the </form> tags and see if the corresponding tep_draw_form has a "get" parameter in every page that you get logged-out from. If so, then add the echo tep_hide_session_id() as in the example.
  12. Like
    Jan Zonjee got a reaction from kymation in Build a Payment module (IDEAL)   
    So you are telling me typed in iDEAL in the search box at addons.oscommerce.com and nothing with iDEAL in the name came up? I think the SQL server doesn't like you than. It's a bit moody sometimes. Maybe if you talk sweet to it it will help.
  13. Like
    Jan Zonjee reacted to Mark Evans in What can we do to speed up development of OSC3?   
    I think the most important piece of information is to have a clear idea of what the bug is and what is needed to reproduce it, if you feel screenshots will help then by all means include them.
     
    The key information needed for any bug is environment, exact version of osCommerce and steps to reproduce. For some good general guidelines take a read of http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
     
    Patches aren't necessarily as important as getting a good bug report, we can quickly fix bugs if we can reproduce them. Of course patches are never turned down so if they can be provided they will be gratefully received.
  14. Like
    Jan Zonjee got a reaction from luvubeauty in New UPS XML Shipping Module available   
    Probably a small error when you added the code in admin/categories.php. Can't think of anything else.
  15. Like
    Jan Zonjee got a reaction from luvubeauty in New UPS XML Shipping Module available   
    Both the sql needed for adding support for split products, the defines, code etcetera is found in the file split_products_instructions.txt which is in the directory dimensional_support. There is no separate sql file for the split products mod.
  16. Like
    Jan Zonjee got a reaction from luvubeauty in New UPS XML Shipping Module available   
    Oh, the table is there, but the define for that table is missing on either the catalog side or the admin side (includes/database_tables.php).
  17. Downvote
    Jan Zonjee got a reaction from TruckloadSales in Error with UPS XML Modeule   
    How about reading the install instructions that came with the module? The error is mentioned in there (plus the support thread for this contribution which you also missed).
×