VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: prong on November 09, 2008, 14:02:08 pm

Title: Shipping rate specific payment method
Post by: prong on November 09, 2008, 14:02:08 pm
Hi folks,

please find attached my solution for configuring shipping rate related payment methods.
Depending on shipping rate the customer is shown only those payment methods which were configured for the selected shipping rate. This is quite helpful for more complext shipping scenarios in the EU.

The attached archive contains the files to substitue as well as a README.
The documentation is currently only in _German_. If you need further explanations in English please let me know.

Cheers

prong

[attachment cleanup by admin]
Title: Re: Shipping rate specific payment method
Post by: samuelkruse on November 21, 2008, 08:58:13 am
sounds like a great thing but it would be ever better with the readme in english so i can understand somethink  ;D
Title: Re: Shipping rate specific payment method
Post by: prong on November 23, 2008, 10:24:24 am
Ok, I did a quick translation of the readme. Hope there are not too many typos in it.

[attachment cleanup by admin]
Title: Re: Shipping rate specific payment method
Post by: psulek on January 26, 2009, 12:34:39 pm
Tried to install this mode. However got no good result. When I move to next step after choosing shipping method, I got message "please choose payment method". I noticed there is no functions delete_record(), list_method() and list_payment_radio() in file ps_payment_method.php . This file looks like  standard instalation file. Any clue?

Best regards

Pawel
Title: Re: Shipping rate specific payment method
Post by: prong on January 27, 2009, 08:11:37 am
Just forgot to post a little fix in this thread. Sorry for that.

For all who try this patch: VM must be configured to ask the customer FIRST for the shipping rate and then for the desired payment method.

Regards,

prong

[attachment cleanup by admin]
Title: Re: Shipping rate specific payment method
Post by: psulek on January 27, 2009, 10:09:59 am
Works fine for me :)
J 1.5.9 + VM 1.1.3
Thank you
Pawel
Title: Re: Shipping rate specific payment method
Post by: flamen on February 17, 2009, 09:36:54 am
Hi all,
I installed 20090104_StandardShippingPaymentRestriction.zip but I have a problem.

I installed first in a test clone (in local) of my site and works fine; than I intalled in the remote site (same files and same method).

I replaced files and create table jos_vm_shipping_rate_payment_method_xref.

Than in VM-admin I create a new shipping rate, selected specific payment method from list and save.

I try to place an order in front-end, I select shipping method but, in the next step, no payment method is showed.

If I open again shipping rate in VM-admin, the payment method list is now hidden (see attach).

If I look into db, table jos_vm_shipping_rate_payment_method_xref is empty.

If I fill manually table in db, nothing change: in VM-admin payment method list is hidden and in frontend no payment method is showed.

Thanks for your help.

Joomla! 1.5.9
VM 1.1.3

[attachment cleanup by admin]
Title: Re: Shipping rate specific payment method
Post by: areo88 on February 17, 2009, 23:03:33 pm
I have the same problem :( Please help...
Title: Re: Shipping rate specific payment method
Post by: areo88 on February 20, 2009, 13:48:13 pm
I think that problem is version of MySQL. I have 4.1.22 and this is source of my problem. Have you any idea? I'm looking for version of this patch for MySQL 4.x. Sorry for my English.
Title: Re: Shipping rate specific payment method [partially solved]
Post by: flamen on March 09, 2009, 17:18:33 pm
Finally it works....

I uploaded files and created db table following instructions.

Than I filled manually fields in jos_vm_shipping_rate_payment_method_xref.

In admin site I have always the same problem, but in frontend now works (perhaps first time I made an arror filling table with ID's numbers).
Title: Re: Shipping rate specific payment method
Post by: tommyli on April 26, 2009, 21:58:31 pm
Have someone fixed this yet??
Title: Re: Shipping rate specific payment method
Post by: alienlove on July 28, 2009, 00:39:48 am
Hi guys,
i've installed this hack and it seems to work fine.

Now, there's a problem: making and order with a downloadable product, at the Payment Method step there are no more options that can be selected.

I think because with this hack, if I've not selected a shipping method I've not a payment method. If there are downloadable products, this logic is not correct.

Ideas?

There's a way to select a list of payment method to use for this type of products?

Thanks.
Andrea
Title: Re: Shipping rate specific payment method
Post by: wroxbox on August 12, 2009, 12:31:23 pm
Does this work if I have settled "free shipping for all over 50€", but say "I don't want to give discount for payment" ... In other words I can set to different rates payment methods and select other based on the shipping total value.  ???

I understand this works only if user selects one of the shipping methods, but what if there is no shipping methods to choose, cause free shipping  ???

I hope you got my point.
Title: Re: Shipping rate specific payment method
Post by: dimk88 on November 12, 2009, 16:43:21 pm
does this work OK with VM 1.1.4 and J1.5?
Title: Re: Shipping rate specific payment method
Post by: michalip on November 27, 2009, 16:02:51 pm
I've tested on J1.5.14 / VM1.1.4

It works great so far

Many many ...many thanks for this prong!!!
Title: Shipping rate specific payment method
Post by: D.Awame on December 03, 2009, 04:23:03 am
Nice mod - thanks.

Is it possible to remove Flat Rate which appears next to the shipping charge so it just shows the price?
Title: Re: Shipping rate specific payment method
Post by: getcom on September 21, 2010, 17:22:13 pm
Hi all,
I installed 20090104_StandardShippingPaymentRestriction.zip but I have a problem.

I installed first in a test clone (in local) of my site and works fine; than I intalled in the remote site (same files and same method).

I replaced files and create table jos_vm_shipping_rate_payment_method_xref.

Than in VM-admin I create a new shipping rate, selected specific payment method from list and save.

I try to place an order in front-end, I select shipping method but, in the next step, no payment method is showed.

If I open again shipping rate in VM-admin, the payment method list is now hidden (see attach).

If I look into db, table jos_vm_shipping_rate_payment_method_xref is empty.

If I fill manually table in db, nothing change: in VM-admin payment method list is hidden and in frontend no payment method is showed.

Thanks for your help.

Joomla! 1.5.9
VM 1.1.3

I had the same problem because my Joomla prefix was not correct.
I deleted the table and created it once again with correct prefix.

Title: Re: Shipping rate specific payment method
Post by: thomas2411 on February 11, 2011, 20:40:19 pm
Hi,

For me it didn't work on Joomla 1.5.22 and VM 1.1.6. It didn't have functions to add records to shipping_rate_payment_method_xref when adding/updating shipping method.

So I took original files from VM 1.1.6 and added author code there, then I added mine.

Tested, works for me ;)

[attachment cleanup by admin]
Title: Re: Shipping rate specific payment method
Post by: jez on March 05, 2011, 13:02:39 pm
Hi,

I used this hack and it works,
but shipping method is related with only one paymet method, although i choosed two.
Otherwise in shipping method (in admin VM) disapear list of payment method, if i opened it one more time.

I use:
Joomla 1.5.22
VM 1.1.7

Jeż
Title: Re: Shipping rate specific payment method
Post by: RC98 on March 24, 2011, 08:19:33 am
Hey all I tried this hack on my joomla 1.5.14 VM 1.1.5 and it works but i got a problem when you try to buy more then two items it will not show a shipping option I check product qt option is set 0 I all ready tried to set weight difference like in oz, kg as I saw in another post but no success any one know how to make this hack work with different amount of products then you get different shipping rates?
Title: Re: Shipping rate specific payment method
Post by: Dezign on May 04, 2011, 15:07:40 pm
Hi,

I used this hack and it works,
but shipping method is related with only one paymet method, although i choosed two.
Otherwise in shipping method (in admin VM) disapear list of payment method, if i opened it one more time.

I use:
Joomla 1.5.22
VM 1.1.7

Jeż

Same problem here. I fixed allready the database structure so the multiple payment methods are saved in the database.

But at the back end (at the shipping rate form) and front end the second payment method disapears...

Anyone know how to show the second and sometimes third payment method??




[attachment cleanup by admin]
Title: Re: Shipping rate specific payment method
Post by: boskoff on May 22, 2011, 22:21:07 pm
Yeap, this links only one payment method with a delivery... :(
Title: Re: Shipping rate specific payment method
Post by: Dezign on May 27, 2011, 14:23:47 pm
Yeap, this links only one payment method with a delivery... :(

Any idea how to show more than one payment method?
Title: Re: Shipping rate specific payment method
Post by: nebojsa on June 05, 2011, 09:53:56 am
Yeap, this links only one payment method with a delivery... :(

What a disappointment for this... but many thanks for updating to 1.1.6.
Title: Re: [SOLVED] Shipping rate specific payment method
Post by: Hy3n4 on August 06, 2011, 16:37:47 pm
OK this is a nice hack. But there is a little problem if you have free shiping set.
When you set free shipping and order will reach this price there will be no option to choose in step 3 / payment method.
So this hack is little bit useless for me :( pitty
Is there a way to make it work with free shipping?
Thanks
--------
I've solved this issue for myself and since I am no programmer I don't know if this solution will be functional for all others.
But here it is.
I found out that value of "shipping_rate_id" for free shipping is "1" so I just added new rows in table "jos_vm_shipping_rate_payment_method_xref" and linked "shipping_rate_id" and "payment_method_id" manualy by running this query.
Code: [Select]
INSERT INTO `database_name`.`prefix_shipping_rate_payment_method_xref` (`shipping_rate_payment_method_id`, `shipping_rate_id`, `payment_method_id`) VALUES (NULL, '1', '2');
INSERT INTO `database_name`.`prefix_shipping_rate_payment_method_xref` (`shipping_rate_payment_method_id`, `shipping_rate_id`, `payment_method_id`) VALUES (NULL, '1', '4');
INSERT INTO `database_name`.`prefix_shipping_rate_payment_method_xref` (`shipping_rate_payment_method_id`, `shipping_rate_id`, `payment_method_id`) VALUES (NULL, '1', '18');
Of course it can be done by adding rows manually in phpMyadmin for example.
I have to point out that your ID for "payment_method_id" will be different from my IDs 2,4,18 you have to find it . And "shipping_rate_id" for free shipping can be different than "1". You can find out your "free_shipping_id" in debug mode.
Hope it helps someone.
Title: Re: Shipping rate specific payment method
Post by: kessels1234 on August 15, 2011, 15:07:30 pm
Free shipping has indeed a problem. Did anyone solve this problem?

Thanks in advance,
Danny
Title: Re: Shipping rate specific payment method
Post by: Souls33k on September 06, 2011, 16:20:17 pm
Didn't work for me either.
It would be really nice if it supported more than one payment method.
Title: Re: Shipping rate specific payment method
Post by: antonino78 on September 07, 2011, 11:57:01 am
Hello everyone,
Before posting my problem I congratulate you on this wonderful hacks.
Unfortunately, I followed the readme to the letter but without good results.
After changing the three files and inserted the new tebella (shipping_rate_payment_method_xref) I have the problem that when I try to buy I can not see the payment methods.
My joomla version is 1.5.23 and vm 1.1.5 stable
Please help me solve my problem?
I need this change
Title: Re: Shipping rate specific payment method
Post by: sudi11 on October 09, 2011, 11:32:19 am
Excellent work! Thanks, you saved a lot of work for me.
Title: Re: Shipping rate specific payment method
Post by: Darkman23 on November 12, 2011, 02:00:35 am
Hello everyone,
Before posting my problem I congratulate you on this wonderful hacks.
Unfortunately, I followed the readme to the letter but without good results.
After changing the three files and inserted the new tebella (shipping_rate_payment_method_xref) I have the problem that when I try to buy I can not see the payment methods.
My joomla version is 1.5.23 and vm 1.1.5 stable
Please help me solve my problem?
I need this change

PLS help! :(       Joomla: 1.5.23and Virtuemart: 1.1.7
Title: Re: Shipping rate specific payment method
Post by: Hy3n4 on November 13, 2011, 11:19:05 am
Did you do a proper binding between shipping and payment method?
Try to look in your database (by phpmyadmin) if there are some records in table jos_vm_shipping_rate_payment_method_xref.
If not, you did not bind shipping with payment method correctly or you did not bind it at all.
Title: Re: Shipping rate specific payment method
Post by: ledstyle on January 04, 2012, 15:05:14 pm
Any solution for this?

I have two payment for now but maybe coming third....so is there any change to get hack like this to work on it?

Title: Re: Shipping rate specific payment method
Post by: ledstyle on January 06, 2012, 20:21:25 pm
Is ther any changes to make small add for this code that when there is no standard shipping choosen , then this "hack" gives all payment methods that are available?? HELP, please
Title: Re: Shipping rate specific payment method
Post by: clibert on March 11, 2012, 13:44:00 pm
Does anyone resolve issue with free shipping? Did anyone solve this problem?

Thanks in advance,
Cezary
Title: Re: Shipping rate specific payment method
Post by: Hy3n4 on March 11, 2012, 14:08:49 pm
I did on page 2 of this thread http://forum.virtuemart.net/index.php?topic=47830.msg293925#msg293925
Title: Re: Shipping rate specific payment method
Post by: clibert on March 11, 2012, 14:41:05 pm
I did on page 2 of this thread http://forum.virtuemart.net/index.php?topic=47830.msg293925#msg293925
Hi,
thank you for reply, but I want a free shipping after certain amoung e.g. 300
I know shipping_id for free shipping, I have xref with payment, but havo no idea how to make to show ONLY free shipping after total of 300
Title: Re: Shipping rate specific payment method
Post by: Hy3n4 on March 11, 2012, 18:48:17 pm
Amount for Free Shipping has to be set in Virtuemart Settings: Store -> Edit store -> Minimum Amount for Free Shipping.

I think thats all you need to get it work.
Title: Re: [SOLVED] Shipping rate specific payment method
Post by: clibert on March 11, 2012, 20:28:53 pm
Code: [Select]
INSERT INTO `database_name`.`prefix_shipping_rate_payment_method_xref` (`shipping_rate_payment_method_id`, `shipping_rate_id`, `payment_method_id`) VALUES (NULL, '1', '2');
INSERT INTO `database_name`.`prefix_shipping_rate_payment_method_xref` (`shipping_rate_payment_method_id`, `shipping_rate_id`, `payment_method_id`) VALUES (NULL, '1', '4');
INSERT INTO `database_name`.`prefix_shipping_rate_payment_method_xref` (`shipping_rate_payment_method_id`, `shipping_rate_id`, `payment_method_id`) VALUES (NULL, '1', '18');
Hy3n4 - you are great!
Thank you!!!
Title: Re: Shipping rate specific payment method
Post by: Hy3n4 on March 12, 2012, 08:46:04 am
I'm glad I could help..
Title: Re: Shipping rate specific payment method
Post by: mxf on May 07, 2012, 21:06:03 pm
Hi

I have make the changes, and it works ok on admin site. I can add new shipping rate combined with payment method.

But when I want to make the order, and add some goods to the basket, there is shipping method (step two) and I can choose that interest me, but in next step payment method (step three) - I have to choose once again the payment method. Why?

Step three can't be deactivated in VM configuration.
Title: Re: Shipping rate specific payment method
Post by: Hy3n4 on May 09, 2012, 09:32:35 am
Hi,

If I get it right I think that I've had exactly same problem and it was caused by linking payment methods with shipping methods in admin area. Maybe there is some problem in script itself. I linked those methods manualy in SQL database so thats probably what you will need to do..
Title: When using this hack payment depending on shipping method
Post by: nemesystar on December 01, 2012, 20:40:40 pm
I have problem with purchase over some price choosen for free shipping. when is shipping for free: e.g. 100 euro i cant select shipping then i cand select payment method... and i get error : choose shipping metho , but there is nothing to choose.

Some ideas??
Title: Re: Shipping rate specific payment method
Post by: firerush on March 06, 2013, 00:28:10 am
Hi all,
did somebody solve the problem with free shipping?
I know that one, but i dont know how to find the shipping_id :( and also replace the mysql call at phpadmin.

Is there some fixed file or something like that?

Thanks a lot
Title: Re: Shipping rate specific payment method
Post by: kalozpepi on April 24, 2013, 22:18:30 pm
1.1.6 path  works!! thank you
joomla 1.5 VM 1.1.9!!!!
Title: Re: Shipping rate specific payment method
Post by: supernet on December 18, 2013, 16:23:13 pm
Hi,
I have installed the StandardShippingPaymentRestriction i followed the instructions but it's not working. My joomla version is 1.5.25 and VM version is 1.1.9 (i tested with 1.1.4 but it didn't work either), i set the ids in the "jos_shipping_rate_payment_method_xref" table manually, but it still don't show payment methods . What might it be ? Can anyone help me?