PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

[Ship2Pay MODULE, CONTRIBUTION] Shows payment methods depends on shipping

173 replies to this topic
#1
szazman

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
Remember to BACKUP before overwriting!!!!


module that limits the number of payment options depending on the chosen shipping method.
For example When my client chooses pickup at store he should not be able to select bank transfer

Attached Files



#2
jolvil

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2706 posts
What about compatibility? PS 1.1 , 1.2 ?

Thanks for sharing your module.
Added to Community Prestashop Modules List

#3
szazman

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts
ship2pay_1.1.zip for presta 1.1 tested on presta 1.105
ship2pay_1.2.zip for presta 1.2.1 tested on presta 1.2.1

#4
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts
Nice work!

Ship2Pay reminds me of osCommerce ;-)
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#5
Kristal Hull

    PrestaShop Newbie

  • Members
  • Pip
  • 22 posts
Love it! Thank you! Exactly what I was needing!

Kristal
Kristal

#6
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts
It looks like it does NOT work in PS 1.2.3 :down:

Furhermore, the shop gets corrupted and you need to reinstall!

I'm not sure if I can save the database.
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#7
ysco

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1015 posts
Thanks for this great module.

Strange TB that it not works for you in 1.2.2.0.
I just installed it in prestashop 1.2.3.0 after you told me about this module and it works a charm, no problems so far.
My problems are solved with this module.


Greats, ysco..

#8
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts

From 1252836265:

Thanks for this great module.

Strange TB that it not works for you in 1.2.2.0.
I just installed it in prestashop 1.2.3.0 after you told me about this module and it works a charm, no problems so far.
My problems are solved with this module.

Greats, ysco..


Hmm, I meand 1.2.3.0.

I will try again.
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#9
Kristal Hull

    PrestaShop Newbie

  • Members
  • Pip
  • 22 posts
It's working fine on my 1.2.3
love it!

Kristal
Kristal

#10
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts
No, I cannot save the settings.
Nothing happens.
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#11
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts

From 1252837397:

It's working fine on my 1.2.3
love it!

Kristal


Do you use a clean installed 1.2.3?
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#12
Kristal Hull

    PrestaShop Newbie

  • Members
  • Pip
  • 22 posts
Um... I did a clean install of the previous version, then updated to 1.2.3
Kristal

#13
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts

From 1252839898:

Um... I did a clean install of the previous version, then updated to 1.2.3


That is what I did to.

I've done a clean install, configured to work with correct paymend and carriers.
Then installed this Ship2Pay module, I cannot config anything in this module because the "add combination" button does not work.

If you push your "add combination" button, what happens?
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#14
Kristal Hull

    PrestaShop Newbie

  • Members
  • Pip
  • 22 posts
So you select a Shipping option, and then select a Payment option that goes with that Shipping option - then click Add Combination?
Kristal

#15
ysco

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1015 posts
Like Kristal Hull said, you need to choose a shipping option and then a payment option then click the add button and it save without a problem.

I did use this on 1.2.3.0. and not used a clean install and works without a problem this way.


ysco..

#16
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts
Busted!

I use IE8 with the Slimbrowser Plug-in, it does niet work in that combination.
It does work with Firefox!
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#17
TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2198 posts
Updated version: 1.2.1

First: I've cleaned the code and made sure that the basic module (without any translation file) would use the English language.
Second: I used common words like Shipmend method and Paymend method so it follows the PrestaShop default.
Third: I've also created a new icon which was missing in the modules list.

All credits goes to the original contributor: szazman

Attached Files


Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

#18
ysco

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1015 posts
Thanks TB for improving this great module ;)


Greats, ysco..

#19
romus

    PrestaShop Newbie

  • Members
  • Pip
  • 1 posts
Updated version: 1.2.2

Thanks for great module!
I think it should be in core.

Minor update:
* visually enhanced,
* expanded payment modules names,
* corrected "shipmend" to shipment,
* corrected identifiers for pl translation,
* added patches, because it's easier to add while core changing.

Cheers,
romus

Attached Files


LepszyProjekt.pl - programowanie, sklepy internetowe, projektowanie stron w Szczecinie.

#20
lopo

    PrestaShop Newbie

  • Members
  • Pip
  • 1 posts
Thank you for this module, it's been really useful.

I found only a minor problem: when you choose the carrier and then the payment (so you're on the "payment_execution.tpl" of most payment modules) and you want to go back to choose another payment, almost every modules has a "Other forms of payment" button which links to
{$base_dir_ssl}order.php?step=3

But clicking gives a "No payment modules have been installed yet" error, because there's no id_carrier set in POST variables.


I found a fix by editing the changed line in order.php.
Ship2Pay's patch has:
$smarty->assign(array('HOOK_PAYMENT' => Module::hookExecPaymentFront(Tools::getValue('id_carrier')), 'total_price' => floatval($orderTotal)));


I changed it to:
$smarty->assign(array('HOOK_PAYMENT' => Module::hookExecPaymentFront(Tools::getValue('id_carrier', $cart->id_carrier)), 'total_price' => floatval($orderTotal)));

So if there's no id_carrier set in $_POST, the value stored in $cart object is used.