Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

niviche

Members
  • Content count

    54
  • Joined

  • Last visited

Everything posted by niviche

  1. This is the support thread for: Quick stock update from the product listing page http://www.oscommerce.com/community/contributions,4812 This contribution adds an input box in the products / categories listing, on which you can enter a new stock level for the product. In this case, you don't need to edit the product to enter a new stock.
  2. niviche

    Official PayPal IPN Support Thread

    Please disregard my post above this one. The bug was coming from an error in my installation. Sorry.
  3. niviche

    Official PayPal IPN Support Thread

    This contribution works great, excerpt for a little bug that I have: if the cart is only virtual (only download products), no pending order is created when the customer arrives at checkout_confirmation. She / he can still go to Paypal and pay for the order, but no order is updated when she / he returns, as there wasn't any order in the database in the first place. Similarily, if the customer orders a virtual and a non virtual product, goes to checkout_confirmation, then modify the content of his cart and delete the non-virtual ("real") products, the pending order is not updated when he comes back to checkout_confirmation. I guess there's a loop somewhere in paypal_ipn.php that inserts or updates the order only if the content is not virtual, or only if a shipping method has been selected, but I can not find it anywhere. Can anybody help?
  4. niviche

    Official PayPal IPN Support Thread

    Terra, I was wrong when I wrote that this worked. Here's the behavior with this modification: 1. when the customer builds his cart and goes to Paypal, there is no number after "order" in paypal. 2. if the customer goes back one page, lands back on checkout_confirmation.php, and then hits the order button again, then an order number appears on the Paypal page. Could it be that $cart_PayPal_IPN_ID is empty / not passed the first time, and that the customer has to go back one step for this variable to have something in it? Is there any way to correct this?
  5. niviche

    Customer Private Messages

    Congratulations for this excellent contribution. I have a small problem with it, though: the messages disappear after the first time they are read. When the customer logs in and hits "account.php", he sees the message. But then, even if he doesn't click on "delete message", the message is deleted. It will not reappear if the customers hits refresh or goes somewhere and comes back to "account.php". Is this the normal behavior of this contribution?
  6. niviche

    Official PayPal IPN Support Thread

    It works perfectly, thank you very much.
  7. niviche

    Official PayPal IPN Support Thread

    Terra, I am trying to pass on to Paypal the order number in the "item_name" parameter, so that, even with everything aggregated, the customer is not paying for "Mom and Pop's shop", but for "Mom and Pop's shop order 12345". I try to change in paypal_ipn: $parameters['item_name'] = STORE_NAME; to $parameters['item_name'] = STORE_NAME . ' order ' . $order_id; But Paypal still doesn't show the order number. Do you know how I should format this line to pass this variable? Thank you very much.
  8. niviche

    NEW! Complete Order Editing Tool!

    Thank you. For some reason, my browser had cached the Contribution page, and I couldn't see the corrected package. I have it now, and all works fine. Congratulations once again for this excellent contribution.
  9. niviche

    NEW! Complete Order Editing Tool!

    As you told me a few posts above, I added the following code to \admin\includes\functions\oe_functions.php: // Function : tep_hml_no_oe_quote // Arguments : string any string // Return : strips apostrophes from strings //Used with Order Editor to workaround problem with apostrophes, double quotes, and line breaks function tep_html_no_oe_quote($string) { $string=str_replace(''', '', $string); $string=str_replace("'", "", $string); $string=str_replace('"', '', $string); $string=preg_replace("/\\r\\n|\\n|\\r/", "<BR>", $string); return $string; } ///end function tep_html_no_oe_quote And now, when I try to edit an order, I get: Parse error: parse error in c:\program files\easyphp1-8\www\catalog\admin\includes\functions\oe_functions.php on line 26 the line 26 is this one: $string=str_replace(''', '', $string);
  10. niviche

    NEW! Complete Order Editing Tool!

    Thank you. I did this, but am getting a "parse error" in this code. :(
  11. niviche

    NEW! Complete Order Editing Tool!

    I just installed the new version of this contribution (v2.8.4), and get the following error when I try to install a product (after clicking on its name or model): Fatal error: Call to undefined function: tep_html_no_oe_quote() in c:\program files\easyphp1-8\www\catalog\admin\edit_orders.php on line 2207 The 2.8.3 version was working just fine. Where should I add this function for the contribution to work?
  12. This is the support thread for: Customers Drop Down In Orders List http://www.oscommerce.com/community/contributions,4818 This contribution adds a drop down menu in the orders list in the admin section. You can then choose to see only orders by a specific customer. Customers are ordered alphabetically by last name.
  13. niviche

    Customers Drop Down In Orders List

    Did you modify this orders.php file while installing another contribution? This line is in the default version of this file on a regular MS2 installation. Try to find the following, around line 353: <?php if (isset($HTTP_GET_VARS['cID'])) { $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; the line you were looking for should be right below it, and the code to insert for this contribution should come in between.
  14. niviche

    Customers Drop Down In Orders List

    You are right, there were artifacts in this query left from another contribution installed on my site. I'm updating the contribution page with this.
  15. niviche

    Official PayPal IPN Support Thread

    It might do, and my attempts at having this contribution work with IPN were unsuccessful. However, I was just trying to get my site to work in the good old way with my post above. :)
  16. niviche

    Official PayPal IPN Support Thread

    You misunderstood me. I am sorry if I wasn't clear. I do not care about the attributes stock. I care about the main, basic quantity of the product itself. As far as I try, if a product has attributes, its stock doesn't get updated. I am speaking of the stock that every product has, the one that comes with the basic OSC installation. :(
  17. niviche

    Official PayPal IPN Support Thread

    This contribution doesn't change anything to the stock of product with attributes. Moreover, if I change anything to checkout_process but does not replicate it in the ipn.php file, it would mean that the IPN contribution would work idependently of any change to checkout_process, right? This file is then bypassed, so any changes brought there do not influe on the IPN contribution, or am I wrong?
  18. niviche

    Official PayPal IPN Support Thread

    Have you tried a product with more than one attribute (for example the option "color" and the values "blue" and "red")? My order status was correctly updated. I also try to order product with and without attribute in the same order, and the stock of the ones without attributes was correctly updated. I do use the contribution "quantity for product attribute", but this bug happens with nothing changed at all in the files from your contribution. :(
  19. niviche

    Official PayPal IPN Support Thread

    Hello, Unless I am wrong, I believe that there is a bug in this otherwise great contribution: the stock update doesn't happen for products with attributes, even for the ones which are not downloads. The quantity in stock stays the same even after the whole IPN process. Is anybody else having this problem?
  20. niviche

    Official PayPal IPN Support Thread

    Hello, I have a small problem with this wonderful contributions. I hope somebody can help. I am using the contribution Quantity for Products Attributes, which is, I believe, a simpler version of QTpro. All it does is add a column "options_quantity" to the table TABLE_PRODUCTS_ATTRIBUTES. When an order is placed, this quantity is updated. I am trying to add this quantity update to ipn.php. I took part of the code that this contribution added to checkout_process, and added the following code to ipn.php. I don't know what's wrong (maybe I put it at the wrong place), but it doesn't work. The whole IPN process still goes well, but the options_quantity is not updated. here is the code I added: $products_ordered_attributes = ''; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { if (DOWNLOAD_ENABLED == 'true') { $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.options_quantity, pa.products_attributes_id, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"; $attributes = tep_db_query($attributes_query); } else { $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.options_quantity, pa.products_attributes_id from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'"); } $attributes_values = tep_db_fetch_array($attributes); $new_quantity = $attributes_values['options_quantity'] - $order->products[$i]['qty']; tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set options_quantity = '" . $new_quantity . "' where products_attributes_id = '" . $attributes_values['products_attributes_id'] . "'"); } } I would be very grateful when somebody could just explain to me how to get the options_quantity in this table updated in the ipn.php file. Thank you very much!
  21. niviche

    Faster Page Loads

    I installed this contribution and got no error message at all. However, I can't find any config_cache.php created anywhere. Just to make sure that I didn't have a wrong directory address, I created tons of config_cache folders everywhere, access my database, and checked them all. Nope, no config_cache.php. I then deleted all these folders, or entered a voluntarily wrong information as a directory to the cache folder, and got no error message at all. I added "Echo 'hello world';" 2 to application_top.php: $config_cache_read = false; if (isset($config_cache_file) && $config_cache_file != '') { if (file_exists($config_cache_file)) { include($config_cache_file); $config_cache_read = true; } } And yes, I get "hello world", these two conditions are checked. And still, no config_cache.php anywhere. What's wrong?
  22. niviche

    Official PayPal IPN Support Thread

    They can get it: if they pay via Paypal, once they have actually paid, Paypal IPN communicates with the site, and the status of the order is changed to "completed". As far as I know, the hack above allows the hacker to add an unpaid order (as pending) to the database, but not to change the status of this order to anything above this level. On the other hand, people paying legitimaly via Paypal will get their instant downloads, as soon as they have paid.
  23. niviche

    Official PayPal IPN Support Thread

    Ok. I tried what was shown in this thread. When somebody uses this hack, an order is recorded but payment is not received. Actually, the Paypal IPN contribution plays nice with this: 1. for all "in advance" payment methods (cash, money order...): since you haven't got the money yet, the order stays "pending", the seller doesn't ship, there is no problem at all. 2. with Paypal IPN: the customer doesn't visit the Paypal site, but his order is still listed as "Preparing", not as "Verified" or "Completed". It means that you haven't received the payment, and that the order hasn't gone through. In this case, you just don't ship the goods. In the case of a customers buying downloadable products, the status of the order will stay "pending" or "preparing". By using the modification I mentionned above, the customer can not download his items without having paid for them. So so far, so good. :)
  24. niviche

    Official PayPal IPN Support Thread

    I might misunderstand you, but I haven't been able to reproduce this. Do you mean that, once you've reached "checkout_confirmation", you type "checkout_process" in the browser's address bar? If that's it, I've tested it and it doesn't allow the user to acccess his (unpaid) downloads.
  25. niviche

    Official PayPal IPN Support Thread

    I am using a turnaround to fix this. First use the http://www.oscommerce.com/community/contri...h,Downloads+boxDownload Page For Pending Downloads[/url] Then, in the file where you have AND o.orders_status >= '2' add this right after it: AND o.orders_status != '4' You should replace the 4 by the status id of "Preparing (Paypal)" on your installation (the first column of the orders_status table)
×