Jump to content
Sign in to follow this  
ednique

[Contribution] Ship 2 Pay v1.0 (MS1)

Recommended Posts

I needed a way to limit the number of payment options depending on the chosen shipping method.

For example When my customer chooses "pickup at store" he should be able to select "cash on pickup" or "moneyorder" and when he chose "flat rate" shipping he should be able to select "cash on delivery" or "moneyorder".

 

After installation, go to the admin > modules and click on ship 2 pay

insert your links between shipping and payment.

If you don't specify any link, the code will work as before.

I know that the admin could be easier, but i think this is fairly good as it is my first contribution.

 

http://www.oscommerce.com/community/contributions,1042

Share this post


Link to post
Share on other sites

Dear ednique,

 

I got everything exactly as it should be, but i doens't work here.

For example i have "Pay on delivery with shipping" En for payment i want only the "Pay on Delivery" on. But that doesn't seem te work. Too bad it sounds great this module.

 

Maybe you have an idea?

 

Thnx

Share this post


Link to post
Share on other sites

Can you tell me the information you have put in?

Or tell me what's in the database table ship2pay.

 

Also, make sure that the modules are turned on in the admin...

all modules for shipping and payment that you want to use should be turned on.

Share this post


Link to post
Share on other sites

Ok this is my fault ! sorry about the mistake...

 

I forgot a very important thing in the install text file:

 

in catalog/includes/classes/payment.php

Find this

global $payment, $language, $PHP_SELF;

Replace with

global $payment, $language, $PHP_SELF,$shipping;

 

Now this will work...

If not, post it here.

Share this post


Link to post
Share on other sites

Version 1.2 is now available for download.

 

Added a status field so that you can disable the links.

 

Also made the admin a bit easier to use... now you get a list of all selectable shipping and payment methods.

 

For upgrading replace the files and copy the new files. + Change the database as detailed in ship2pay.sql

 

I hope that this time everything is included... please let me know.

Share this post


Link to post
Share on other sites

Hi Edwin,

 

I believe you are missing a field in your SQL statement. I am getting the following error:

 

1054 - Unknown column 's2p_id' in 'field list'



select s2p_id, shipment, payments_allowed, status from ship2pay limit 0, 12



[TEP STOP]

 

David

Share this post


Link to post
Share on other sites

So i made an error again.

 

This is the correct sql.

CREATE TABLE `ship2pay` (

`s2p_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,

`shipment` VARCHAR( 100 ) NOT NULL ,

`payments_allowed` VARCHAR( 250 ) NOT NULL ,

`status` TINYINT NOT NULL 

);

Share this post


Link to post
Share on other sites

Version 1.2.2 has been submitted...

 

It seems that i forgot to include my remark in this forum about the global variables in the install.txt

Share this post


Link to post
Share on other sites

Just posted the version 1.3

 

Fixed a small bug that occurred with advanced shipping modules...

 

Upgrade instructions can be found in the install.txt

Share this post


Link to post
Share on other sites

your last version still have a little bug in the sql files. The table camp s2p_id is missing, and a camp named shp_id is there instead... btw great work dude!!!


my contribution: Alex's Contributions

Share this post


Link to post
Share on other sites

i get this erorr please help?

 

Ship 2 Pay

 

Shipment Payments Allowed Status Action

1054 - Unknown column 's2p_id' in 'field list'

 

select s2p_id, shipment, payments_allowed, status from ship2pay limit 0, 20

Share this post


Link to post
Share on other sites

Thanks for a great module! I would like to confirm that this module works for MS2 without modifications.


Graeme Simms.

Share this post


Link to post
Share on other sites

Sorry, but as an PHP/SQL beginner I have some problems where to (exactly) copy that code-lines:

 

open the file catalog/application_top.php and add:

define('TABLE_SHIP2PAY','ship2pay');

 

 

open the file admin/includes/boxes/modules.php

add the following at the end:

'<a href="' . tep_href_link(FILENAME_SHIP2PAY, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_MODULES_SHIP2PAY . '</a>'

 

open the file admin/includes/languages/german.php

add the following lines

define('BOX_MODULES_SHIP2PAY', 'Ship 2 Pay');

define('TEXT_DISPLAY_NUMBER_OF_PAYMENTS', 'Angezeigt werden <b>%d</b> bis <b>%d</b> (von insgesamt <b>%d</b> Ship 2 Pay)');

 

Can?t you please let me know at which position (place behind, place between...) a dummy like me has to copy that stuff :blink:

Share this post


Link to post
Share on other sites

Hmm... maybe someone can mail me his Files so I can find out the exact places by myself?

 

ash@scape-media.de

Share this post


Link to post
Share on other sites

I get the followin error with some shippingoptions (Note: Not all!):

 

Fatal error: Call to undefined function: javascript_validation() in /home/sites/site56/web/catalog/includes/classes/payment.php on line 113

 

Anybody knows what to do?

Share this post


Link to post
Share on other sites
Just put them in  top of the files. This should work.

 

Maybe I got the source of the non-working addOn:

open the file catalog/application_top.php and add:
define('TABLE_SHIP2PAY','ship2pay');

 

There?s no such file ((even in the original osc2.2m2 Contribution) - Only in "/admin/includes/"!

 

Can someone please send me all of his modificated and proper working files ( ash@scape-media.de ) ?

 

 

 

catalog/application_top.php

admin/includes/boxes/modules.php

admin/includes/application_top.php

admin/includes/languages/english.php

Share this post


Link to post
Share on other sites

works great, thx

 

 

scape, for ms2 define('TABLE_SHIP2PAY','ship2pay'); goes in the database_tables file

Share this post


Link to post
Share on other sites

Hello,

 

i have installt the contrib

But it dosn?t work !

 

The Link is in the Admin, but they can?t find the Page

 

Can You Help me, Please ?

 

THX

Share this post


Link to post
Share on other sites

I've found this great modul to configure the shipping options and I was so happy to find the modul, but after installation I've got a problem!

 

When a customer clicks on flat or on Zone Rates at choosing the shipping method and then click next I get the following error:

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /homepages/10/d28371936/htdocs/shop/includes/functions/database.php:13) in /homepages/10/d28371936/htdocs/shop/includes/functions/database.php on line 13

 

So I read the installation instructions but I find nothing which could help me.

So I have nothing change in this file.

 

Please help me to find the problem!!!

 

Thanks.

 

Muecke

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
Sign in to follow this  

×