Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


raiwa

Recommended Posts

This is the support forum for:

PayPal Express Checkout for Discount and Extra Fee Order Total Modules by Bernhard Bauer and @raiwa

http://addons.oscommerce.com/info/8848

 

This Add-On will include discount and extra fee quantities to the PayPal payment.

 

The included file will work for the following Order Total modules:

 

ot_loworderfee

included in standard OsCommerce 2.2. and 2.3. Stores

 

Quantity Discounts by That Software Guy (OSC 2.3.)

http://addons.oscommerce.com/info/7881

or

Quantity Discounts by That Software Guy (OSC 2.2.

http://addons.oscommerce.com/info/6751

 

Discount Code v3.1

http://addons.oscommerce.com/info/7397 (OSC 2.2.)

or

http://addons.oscommerce.com/info/7700 (OSC 2.3.)

 

 

This PayPal Express Checkout module can be modified to work with other Order Total modules too.

Edited by raiwa
Link to comment
Share on other sites

  • 3 weeks later...

Hi, I am trying to get the Gift Wrap (http://addons.oscommerce.com/info/8115) order_total to work as per your instructions, as yet with no success. Please can you point me in the right direction.

 

The code I have used is as follows:

 

// Gift Wrap - start

$orig_amt = $params['AMT'];

$before=$paypal_express->format_raw($order->info['total'], '', 1);

if (MODULE_ORDER_TOTAL_GIFTWRAP_STATUS=='true') {

include(DIR_WS_MODULES . 'order_total/ot_giftwrap.php');

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_giftwrap.php');

$ot_giftwrap = new ot_giftwrap;

$ot_giftwrap->process();

$after = $paypal_express->format_raw($order->info['total'], '', 1);

$params['AMT'] = $orig_amt;

 

if($before<$after){

$params['AMT'] = $params['AMT'] +($after-$before);

$giftwrap=$after-$before;

$params['L_NAME' . $line_item_no] = html_entity_decode(MODULE_ORDER_TOTAL_GIFTWRAP_TITLE);

$params['L_AMT' . $line_item_no] = ($paypal_express->format_raw($giftwrap));

$params['L_QTY' . $line_item_no] = 1;

$params['ITEMAMT']=$params['ITEMAMT']+(($paypal_express->format_raw($giftwrap)));

}

}

// Gift Wrap - end

 

 

The gift Wrap title and value do not get passed to Paypal. Please help, where I am I going wrong??

 

Regards

 

Simon

Edited by simonhornby
Link to comment
Share on other sites

Hi All. Sussed!!! The following works a treat to get Gift Wrap (http://addons.oscommerce.com/info/8115) description and order total showing in PayPal Express order information pane on the Paypal website. Follow the original install instructions and add the code below.

 

// Gift Wrap - start

$orig_amt = $params['AMT'];

 

$before=$paypal_express->format_raw($order->info['total'], '', 1);

if (MODULE_ORDER_TOTAL_GIFTWRAP_STATUS == 'true') {

include(DIR_WS_MODULES . 'order_total/ot_giftwrap.php');

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_giftwrap.php');

$ot_giftwrap = new ot_giftwrap;

$ot_giftwrap->process();

$after = $paypal_express->format_raw($order->info['total'], '', 1);

$params['AMT'] = $orig_amt;

 

$params['AMT'] = $params['AMT'] +($order->info['giftwrap_cost']);

$giftwrap = $order->info['giftwrap_cost'];

$params['L_NAME' . $line_item_no] = html_entity_decode(MODULE_ORDER_TOTAL_GIFTWRAP_TITLE);

$params['L_AMT' . $line_item_no] = ($paypal_express->format_raw($giftwrap));

$params['L_QTY' . $line_item_no] = 1;

$params['ITEMAMT']=$params['ITEMAMT']+(($paypal_express->format_raw($giftwrap)));

$line_item_no++;

}

// Gift Wrap - end

 

Simon :D

Link to comment
Share on other sites

  • 1 month later...

I want to know whether this Paypal EC can support & including shipping fee?

 

shipping is included by default without any modification

Link to comment
Share on other sites

  • 2 months later...

How can I get Paypal express to always go to the "Review your information" page? It only seems to go there if the customer is logged in. When logged out, it only show the abbreviated cart in the upper right, not the more detailed one from the review page.

 

Thanks

Edited by casof
Link to comment
Share on other sites

  • 2 months later...

How can I get Paypal express to always go to the "Review your information" page? It only seems to go there if the customer is logged in. When logged out, it only show the abbreviated cart in the upper right, not the more detailed one from the review page.

 

Thanks

 

Hello Katherine @@casof,

 

I'm very sorry for the very late reply, hope you got a response meanwhile. Here for any case the fix:

 

In includes/modules/payment/payment_express.php, make the following change in the pre_confirmation_check() function:

 

//			    if ($response_array['AMT'] == $this->format_raw($order->info['total'])) {
//					  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'));
//			    } else {
				    tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'do=confirm', 'SSL'));
//			    }

 

(all credit to @@Harald Ponce de Leon)

 

regards

Rainer

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

could someone tell me where to find the original Paypal Express Checkout? The version I have does not work with this..

 

thank you,

 

Nathalie

 

Hello Nathalie @@mfactory,

 

Its included in OsCommerce at least since oscommerce-2.2rc2a

 

kind regards

Rainer

Link to comment
Share on other sites

Hello -

 

I just installed this add on, but I'm having an issue with the coupon code being applied to PayPal. For instance, when I order 3 items and input a coupon code for $15 off it marks two of the items down to $0.08 and then the 3rd item costs jumps up to $170, instead of $20. So the order total ends up being the same, and the individual item prices are messed up.

 

Could you help me fix this?

 

Also, is there a way to apply/offer coupon codes for people who immediately click on the PayPal express checkout button from the shopping cart?

 

Thanks!

Link to comment
Share on other sites

Hello -

 

I just installed this add on, but I'm having an issue with the coupon code being applied to PayPal. For instance, when I order 3 items and input a coupon code for $15 off it marks two of the items down to $0.08 and then the 3rd item costs jumps up to $170, instead of $20. So the order total ends up being the same, and the individual item prices are messed up.

 

Could you help me fix this?

 

Also, is there a way to apply/offer coupon codes for people who immediately click on the PayPal express checkout button from the shopping cart?

 

Thanks!

 

Hello Jenna @@CiscoCo,

 

It should work with this coupon-code add-on:

Discount Code v3.1

http://addons.oscommerce.com/info/7397 (OSC 2.2.)

or

http://addons.oscommerce.com/info/7700 (OSC 2.3.)

 

For other add-ons you need to modify the code like explained in steps 4-6 of the install instructions.

 

For the shopping cart: this is explained in step 2-3 of the install instructions.

 

If you are using another coupon code and can't get it to work, consider using the above mentioned Discount Code v3.1.

 

Kind regards

Rainer

Link to comment
Share on other sites

  • 7 months later...

I've setup the paypal express on my v2.3.4 and would like the customer to only see payment option after shipping method is chosen, in other words, after checkout button. Can I just take the Paypal button off of the cart screen?

Link to comment
Share on other sites

I've setup the paypal express on my v2.3.4 and would like the customer to only see payment option after shipping method is chosen, in other words, after checkout button. Can I just take the Paypal button off of the cart screen?

 

Hello Thomas @@Tbyrd

 

Best is to comment out or remove in shopping_cart.php this block:

<?php
    $initialize_checkout_methods = $payment_modules->checkout_initialization_method();

    if (!empty($initialize_checkout_methods)) {
?>

  <p align="right" style="clear: both; padding: 15px 50px 0 0;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p>

<?php
      reset($initialize_checkout_methods);
      while (list(, $value) = each($initialize_checkout_methods)) {
?>

  <p align="right"><?php echo $value; ?></p>

<?php
      }
    }
?>

regards

Rainer

Link to comment
Share on other sites

I'm having trouble with the commenting out!  I'm not a PHP guru my any means, but with C++ I'm used to the  /*  comment */  and  //  for the beginning of a line. It seems there are some commands that are immune to being commented out.

What is the proper method?

Link to comment
Share on other sites

I'm having trouble with the commenting out!  I'm not a PHP guru my any means, but with C++ I'm used to the  /*  comment */  and  //  for the beginning of a line. It seems there are some commands that are immune to being commented out.

What is the proper method?

<?php
/*
    $initialize_checkout_methods = $payment_modules->checkout_initialization_method();

    if (!empty($initialize_checkout_methods)) {
?>

  <p align="right" style="clear: both; padding: 15px 50px 0 0;"><?php echo TEXT_ALTERNATIVE_CHECKOUT_METHODS; ?></p>

<?php
      reset($initialize_checkout_methods);
      while (list(, $value) = each($initialize_checkout_methods)) {
?>

  <p align="right"><?php echo $value; ?></p>

<?php
      }
    }
*/
?>

Beginning must be inside <?php tag

<?php

/* 

here alll code to be commented out

*/

?>

end must be before end php tag ?>

Link to comment
Share on other sites

  • 4 months later...

Hi

 

I am using Oscommerce 2.3.4 and added this addon.  It works but I am having problems displaying the correct tax with Discount Code 3.2.  I have checked & rechecked Discount Code 3.2 mods couldn't find a problem. I decided to start over again and when I was doing the mods for PayPal  Express Checkout for Discount that ext/modules/payment/paypal/express.php file was different. It had been change for Osc 3.2.4 and that the code where i was suppose to add your code does not exist.

 

***Find:
    
// don't recalculate currency values as they have already been calculated
      $params['SHIPPINGAMT'] = $paypal_express->format_raw($cheapest_rate, '', 1);
      $params['AMT'] = $paypal_express->format_raw($params['ITEMAMT'] + $params['TAXAMT'] + $params['SHIPPINGAMT'], '', 1);
      $params['MAXAMT'] = $paypal_express->format_raw($params['AMT'] + $expensive_rate + 100, '', 1); // safely pad higher for dynamic shipping rates (eg, USPS express)

 

Is there an update for the new version of Express.php or can your  code be added to it and where.

 

Rick Stimers

 

Link to comment
Share on other sites

Hello rick @@Du9dley1,

 

the paypal express version included in 2.3.4 is updated and doesn't need any modification. It should work with diecount code and any other third party modules as is.

Link to comment
Share on other sites

  • 7 months later...

Hello Jessi @@suchisuchi,

 

If you refer to this one:

http://addons.oscommerce.com/info/9020

it doesn't work with paypal express and probably other modules of the paypal app versions, neither with the previous 3.2 paypal express version.

 

You should use that one:

Discount Code v3.1
http://addons.oscommerce.com/info/7397 (OSC 2.2.)
or
http://addons.oscommerce.com/info/7700 (OSC 2.3.)

 

It works with PayPal modules with no need of modifications.

 

regards

Rainer

Link to comment
Share on other sites

Helo Jessi @@suchisuchi,

 

Thats how the newer PayPal express versions work. The order totals are correct, but the details are not shown if third party order total add-ons are used. Please read the PayPal App Instructions, it's explained there.

 

regards

Rainer

Link to comment
Share on other sites

  • 10 months later...

Raiwa,

 

Recent I work with OSC 2.3.4
PayPal express and Paypal standard is installed and works fine.

 

I want that buyers pay the paypal commision, I found in orders total the addon "the cost of payment methonds"  
When activate the existing standard paypal_ipn  3% fees is not working when make a test order.

 

How to get it working ?

Boldman

Link to comment
Share on other sites

Hello Jan @@Boldman,

 

I'm sorry I do not use that order total module and have no idea. This question is not related to this support forum.

Please post in the support thread for the payment surcharge add-on, if exists or in the general support forum. Like this it will be much easier that someone who is familiar with it will see it and respond.

 

Kind regards

Rainer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...