Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Oza

Pioneers
  • Posts

    119
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Oza reacted to Xpajun in Different shipping costs in UK   
    Oza - sorry for the long delay in posting - been very busy...
     
    this is the one I used and adapted for UK Parcelforce and then International Parcelforce - it works very well but your customes have to use the correct format for the UK postcode I.e XX1 2ZZ because the program looks for the space to set the shipping price
  2. Like
    Oza reacted to derektimbrell in Store title instead of item on Paypal page   
    I've made a change in my paypal_standard.php so that my Paypal Website Standard module now passes through the item details rather than the store name and order information that goes though in the released version. It also passes the product model number and the name and value of the first two product attributes if they've been used. As far as I'm aware Paypal only supports two optional attributes.
     
    To make this work, and to keep the shipping, tax and totals that Paypal displays in line with what was actually ordered, I've had to do a slight fiddle when passing the tax and shipping through. The tax and shipping for the entire order are passed through with the first item; the tax and shipping for all remaining items are set to zero. That was the only way I could find to make Paypal display the order totals correctly.
     
    Here's the change (to file includes/modules/payment/paypal_standard.php )
     
    Find this

    $parameters = array('cmd' => '_xclick', 'item_name' => STORE_NAME, 'shipping' => $this->format_raw($order->info['shipping_cost']), 'tax' => $this->format_raw($order->info['tax']), 'business' => MODULE_PAYMENT_PAYPAL_STANDARD_ID, 'amount' => $this->format_raw($order->info['total'] - $order->info['shipping_cost'] - $order->info['tax']), 'currency_code' => $currency, 'invoice' => substr($cart_PayPal_Standard_ID, strpos($cart_PayPal_Standard_ID, '-')+1), 'custom' => $customer_id, 'no_note' => '1', 'notify_url' => tep_href_link('ext/modules/payment/paypal/standard_ipn.php', '', 'SSL', false, false), 'return' => tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'), 'cancel_return' => tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'bn' => 'osCommerce22_Default_ST', 'paymentaction' => ((MODULE_PAYMENT_PAYPAL_STANDARD_TRANSACTION_METHOD == 'Sale') ? 'sale' : 'authorization')); if (is_numeric($sendto) && ($sendto > 0)) {
     
    and replace it with
     

    $parameters = array('cmd' => '_cart', 'upload' => '1', 'business' => MODULE_PAYMENT_PAYPAL_STANDARD_ID, 'currency_code' => $currency, 'invoice' => substr($cart_PayPal_Standard_ID, strpos($cart_PayPal_Standard_ID, '-')+1), 'custom' => $customer_id, 'no_note' => '1', 'notify_url' => tep_href_link('ext/modules/payment/paypal/standard_ipn.php', '', 'SSL', false, false), 'return' => tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'), 'cancel_return' => tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'bn' => 'osCommerce22_Default_ST', 'paymentaction' => ((MODULE_PAYMENT_PAYPAL_STANDARD_TRANSACTION_METHOD == 'Sale') ? 'sale' : 'authorization')); for ($i=0; $i<sizeof($order->products); $i++) { $j = $i+1; $parameters['item_name_' . $j] = $order->products[$i]['name']; $parameters['item_number_' . $j] = $order->products[$i]['model']; $parameters['amount_' . $j] = $this->format_raw($order->products[$i]['final_price']); $parameters['quantity_' . $j] = $order->products[$i]['qty']; $parameters['on0_' . $j] = $order->products[$i]['attributes'][0]['option']; $parameters['os0_' . $j] = $order->products[$i]['attributes'][0]['value']; $parameters['on1_' . $j] = $order->products[$i]['attributes'][1]['option']; $parameters['os1_' . $j] = $order->products[$i]['attributes'][1]['value']; // the total shipping and tax values for the order are output against the // first product, and tax and shipping are set to zero for all subsequent // products. // the order tax applied to the first product has to be divided by the // quantity for that product because paypal treats this as the tax for // 1 of that product and will multiply it by the quantity. if ( $i == 0 ) { $parameters['shipping_' . $j] = $this->format_raw($order->info['shipping_cost']); $parameters['tax_' . $j] = $this->format_raw($order->info['tax']) / $order->products[$i]['qty']; } else { $parameters['shipping_' . $j] = 0; $parameters['tax_' . $j] = 0; } } if (is_numeric($sendto) && ($sendto > 0)) {
     
    While this works i.e. it passes the item details rather than the store name and order details, I'm not sure whether there's anything I've done that makes it any less secure or more hackable than it was before. Any thoughts on that would be appreciated.
     
    Anyone wanting to look at the changes in detail might also find this useful : https://www.paypal.com/IntegrationCenter/ic...-reference.html
     
    Thanks.
  3. Like
    Oza reacted to ecommforum in Store title instead of item on Paypal page   
    Thanks a lot!!!! This was big help even 3 years later...thanks again for your help.
    I just wonder if there is any possible way to send the order comments that the user post in oscommerce to the PayPal invoice...so I can see these comments without checking my orders in oscommerce....Thanks so much in advance
  4. Like
    Oza got a reaction from New to osCommerce in Product Image and Facebook   
    Hi there, Has anyone had this problem. When I want to send a link to a product page on Facebook it doesn't show the product image and displays something from the include or the new products box. Same using the share button.
    I'm using the Additional Images Module.
     
    Oza
  5. Like
    Oza reacted to Jack_mcs in google base feed wth google product category?   
    Yes, along with a number of other changes.
×
×
  • Create New...