Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Guest

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

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
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 

);

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

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

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

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:

Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
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 ( [email protected] ) ?

 

 

 

catalog/application_top.php

admin/includes/boxes/modules.php

admin/includes/application_top.php

admin/includes/languages/english.php

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

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

Link to comment
Share on other sites

  • 8 months later...

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

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...