Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

wonton

Archived
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Real Name
    Paul Yip

Recent Profile Visitors

6,711 profile views

wonton's Achievements

  1. Hi Deeogee(?), I am trying to use your Blue Hex Template. I have some buttons that are not standard with OSCommerce, but I need them in the same style as the ones you have created. Would you be so kind as to create these buttons for me? The buttons/Button Text I need are: Edit Cart Checkout Remove Selected Please send to paulyip111 (at) yahoo (dot) ca Thank You! Paul
  2. I know this problem and have a VERY hacky fix that only works for the tax setup on my site. For me, there are two parts to this problem: 1) From what I understand, OS Commerce doesn't handle Canadian Taxes very well - my wife figured out how to get it working once -but I never understood it fully. 2) The original contributor of this code wrote this for his shop, and in his region of the world - wherever it is- all prices include tax. YOUR shop probably calculates tax on the bottom line after subtotal has been calculated. So, if you have an item that is $10 and the tax rate is 10%, then upon editing an order, the code recalcuates the item of the price to include tax and everything gets thrown off. You will need to edit orders_ajax.php (I think I got the name right, not at my dev box) and look for the line where it performs an SQL UPDATE to the ORDERS_TOTAL table. See how it calculates tax - you basically will have to re-write that code for your purposes. Unless you are in Canada with GST and PST and tax regions defined the same way I do, my code wont work for you - unfortunately =( ... but its a great contrib when its working =P Paul
  3. Solved my own problem. I modified the code so that it wraps the product name with addslashes() function to fix this. I have uploaded the fix as well to the orginal contrib. Paul
  4. Hi There, I installed this contrib and think its INCREDIBLE! 99% working as designed but found a small bug (at least, I'm quite sure its a but) and I dont know how to fix. Hoping someone may have a clue. Basically, I am able to use the "Add Product" function with *most* products in my store - but not all. I have some products in my product catalog with single quote in it that seems to be causing the problem. For example, if the product name is: Bobs Can Opener ...the "Add Product" function works fine and the item is added successfully to the order after a page refresh. If the product Name is: Bob's Can Opener ..then I get confirmation messages that the product has been added, but upon refresh, the order does not change. I can play with this back and forth confirming that it is the apostrophe that's causing the problem by editing the product name in my catalog. Can anyone help with this? Thank You Paul (Wonton)
  5. Hi There, I installed this contrib and think its INCREDIBLE! 99% working as designed but found a small bug (at least, I'm quite sure its a but) and I dont know how to fix. Hoping someone may have a clue. Basically, I am able to use the "Add Product" function with *most* products in my store - but not all. I have some products in my product catalog with single quote in it that seems to be causing the problem. For example, if the product name is: Bobs Can Opener ...the "Add Product" function works fine and the item is added successfully to the order after a page refresh. If the product Name is: Bob's Can Opener ..then I get confirmation messages that the product has been added, but upon refresh, the order does not change. I can play with this back and forth confirming that it is the apostrophe that's causing the problem by editing the product name in my catalog. Can anyone help with this? Thank You Paul (Wonton)
  6. To have the ipn.php file, you need to have the Paypal IPN module install. There is an older paypal module which does not have the IPN (instant payment notification) feature.. Assuming you have the Paypal IPN module, it is located under catalog/ext/modules/payment/paypal_ipn.
  7. Here is the code to do it: in /catalog/admin/orders.php, Search on the word "cc_number". You will see: <td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td> <td class="main"><?php $order->info['cc_number']; </td> </tr> Change to: <td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td> <td class="main"><?php //py: code to format cc_number with spaces $cc_p1=substr($order->info['cc_number'],0,4); $cc_p2=substr($order->info['cc_number'],4,4); $cc_p3=substr($order->info['cc_number'],8,4); $cc_p4=substr($order->info['cc_number'],12,4); echo $cc_p1 . '-' . $cc_p2 . '-' . $cc_p3 . '-' . $cc_p4; ?></td> </tr> This will put dashes between groups of 4 numbers.
  8. We make use of Windowed Envelopes #10, and a modified packingslip.php. When the packing slip is folded, the customers' address is shown through the window and we then tape it down. It leaves no room for error as there is no data entry required. We then ship using Canada Post. We are investigating printing our own shipping labels through the online shipping tools provided byCanada Post. This is required if you want parcel pickup service. In this case, to avoid data entry errors, we are thinking that we'll barcode everything to avoid having to type critical address information.
  9. Hi There, I also struggled with XML parsing error when I first started using Canada Post Module. The problem turned out to be that I had HTML tags in my Product Titles. As part of the POST of parcel information to Canada post, Product Titles are also sent (not sure exactly why). Also, certain characters are not allowed in the titles, like & (amperstand) which cause problems. To be safe, I would remove all special characters not in the range A..Z, a..z, 0..9 Hope that helps. If you need support for special fixes for Canada Post modules or other osc modules, I may take contract work depending on the problem (size and scope). I can be reached at [email protected] (remove the xxx, which I use to avoid spam) Paul
  10. On my site, I accept credit cards and paypal payments. 99.9% of the time, credit card payments go through, so I dont worry about those. Those orders go right to Pending state when received. For PayPal payments, I always have two concerns 1) if a payment was sent using eCheck, I dont want employees processing them until eCheck is cleared 2) if a payment was received, was it the right amount? Therefore, I always want to validate paypal payments first. I want all paypal orders redirected to a PayPal state that I've created. Once validated, I move them from PayPal state to Pending State, and for the employees, its business as usual. To make this fix: $order_status_id = DEFAULT_ORDERS_STATUS_ID; change to: $order_status_id = <your desired state id>; In my case, PayPal state was orderstate 5, so I used: $order_status_id = 5;
  11. I've seen this problem posted several places, with different fixes that seemed to work for others, but not me. I have a canadian store that uses only Canadian Currency. When customers use PayPal to pay, they are redirected to the PayPal website with my store information, but the amount to be payed is always shown as 0 (zero). Hence, I end up with one of two potential problems: 1) The customer did not make note of how much to pay, and hits a back button only to get a Page has Expired - they might give up at this point. 2) The customer enters the wrong amount to pay. My store allows buying multiple items at the same time before checkout and taxes and shipping are totalled. The final amount is sent to paypal as an aggregate. I am using the PayPal IPN module with these settings: Enable PayPal IPN Module = True Move tax to total amount = True E-Mail Address = me@myemailaddress Transaction Currency=Selected Currency Payment Zone=none Set Preparing Order Status=Preparing [PayPal IPN] Set PayPal Acknowledged Order Status=PayPal (**) Gateway Server=Live Transaction Type=Aggregate (**) another fix is required if you dont wish to use default order state... see post titled: Fix for PayPal IPN Order State To fix: file: /catalog/includes/modules/payment/paypal_ipn.php In the function definition process_button(): original: if (!in_array($my_currency, array('AUD', 'CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'USD'; } change to: if (!in_array($my_currency, array('AUD', 'CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'CAD'; } ..... then search for the following piece of code: if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') { // PandA.nl move tax to total amount $parameters['amount'] = number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } else { // default $parameters['amount'] = number_format(($order->info['total'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } and change it to: if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') { // PandA.nl move tax to total amount $parameters['amount'] = number_format($order->info['total'], 2); } else { // default $parameters['amount'] = number_format(($order->info['total'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)); } Explaination: - $order->info['shipping_cost']) --> I dont know why the shipping cost was being subtracted. leaving this in tact would result in the paypal payment posted to be less than expected. * $currencies->get_value($my_currency) --> This expression was evaluating to 0, which I think implies something is broken. Because its being multiplied, the entire amount gets 0,... which is the main source of the problem. Perhaps this is due to my use of Canadian (CAD) currency. My expectation is that some sites that support multiple currencies would have this expression result in a fractional mulitiplier to get the right result. - didnt work for me, so I took it out. $currencies->get_decimal_places($my_currency) --> this is the second parameter to the number_format function. Its suppose to evaluate to 2, but it evaluates to 0. Don't know why. Leaving this in results in the amount sent to paypal as a whole number. As you can see, this is a total hack, but in the end, I just want my stuff to work until an official and proper fix is in place. I dont understand the currency exchange infrastructre in OSC to make a proper fix. Hopefully, someone else can with this information.
×
×
  • Create New...