Jump to content
BrockleyJohn

ship2pay for 2.3.x

Recommended Posts

No existing support thread that I can find...

 

I just uploaded an updated version of this addon:

- php7 compliant

- doesn't use filenames.php

- minimal core changes (one file)

 

Addon is http://addons.oscommerce.com/info/8419

 

Also on github in a branch of Edge at

https://github.com/BrockleyJohn/Responsive-osCommerce/tree/addon_ship2pay


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Hey there John.

 

Thanks for putting this together. 

I took a quick look a the code and noticed a few php notification that were generated due to not checking if variable isset.  Attached is the modified code for the admin page.ship2pay.php

Edited by marcello

Share this post


Link to post
Share on other sites

Thanks Marcello, I'll take a look. I confess I didn't go far into testing the existing code or running with E_STRICT, I just whacked in a set of refinements and tested them!


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Hello @BrockleyJohn
Under php7.2  it give a

PHP Warning: PHP Fatal error:  Cannot redeclare class ship2pay in /home/shop/includes/classes/ship2pay.php on line 20


Br
Omar


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

@Omar_one that would be a fatal error at any php level

How have you got two class declarations in the file? That usually occurs with modules when people upload the class file to the language directory, so I'm struggling to guess how you managed it.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

I have no idea 😳  ..... there is class file in the language directory
If I change the

require('includes/classes/ship2pay.php');

to

require_once('includes/classes/ship2pay.php');

the  warring not show any more for that class it give another warring

 warring PHP Fatal error:  Cannot redeclare class cod in /home/shop/includes/modules/payment/cod.php on line 13


 


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

@BrockleyJohn   I found why it give this  warring because  I have  Modules Shopping Cart  installed by @raiwa

so if I uninstall it your module working with any warring..  Do you have idea how to make it working with that module ?

Thank you
Omar


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

after changing  this line  in  Modules Shopping Cart  module ...  includes/modules/content/shopping_cart/cm_sc_checkout_alt.php ..

      		include('includes/classes/payment.php');

to

      		include_once('includes/classes/payment.php');

 there is no warring,  I don't know if it is the right fix !!!
Br
Omar


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

@Omar_one I can't see any problem with your change, it should be fine


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@Omar_one, thats ok like John says. I'll apply this to the shopping cart module in the next update. Thank you!

Share this post


Link to post
Share on other sites

would it be possible to have this work with Phoenix and no file changes at all?


Quo plus habent, eo plus cupiunt

Share this post


Link to post
Share on other sites

Up to now there is still no way to extend the payment class to restrict the selection on checkout_payment without modifying core code, so the modification to the constructor of the core class is the simplest way of doing it.

If @raiwa's latest request for a hook in the payment form might be a way in if it gets anywhere.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×