VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: smalldragoon on August 24, 2016, 10:52:37 AM

Title: Selecting shipment methods available based on some criterias for each customer
Post by: smalldragoon on August 24, 2016, 10:52:37 AM
Hello,
I would like to be able to show to a customer shipment methods based on some profiling info from him ( basic sutpid exemple : it is a male, only normal , female : UPS is available as well )
I would like to be able to do the same as well for payment ( and potentially, have the shipment method selected as an input of decision of this )
Do you know how I can do this ?
Thanks
Title: Re: Selecting shipment methods available based on some criterias for each customer
Post by: GJC Web Design on August 24, 2016, 11:23:55 AM
You need to code this into the function checkConditions($cart, $method, $cart_prices) of what ever plugins your working with

or show/hide methods in the cart by php or JS
Title: Re: Selecting shipment methods available based on some criterias for each customer
Post by: smalldragoon on August 24, 2016, 15:52:58 PM
HI
ok, I'm using the standard plugin payement as it is for a demo
any specific suggestion ?
Title: Re: Selecting shipment methods available based on some criterias for each customer
Post by: GJC Web Design on August 24, 2016, 15:54:09 PM
well.. specifically the one above..  ;)
Title: Re: Selecting shipment methods available based on some criterias for each customer
Post by: smalldragoon on August 24, 2016, 18:31:42 PM
mmm, thanx
but this function just checks if payment and shipment are defined right ? it doesn't decides which payment is existing ? so I can not add my code to select the one I want ( or not ) based on my criteria ?
Title: Re: Selecting shipment methods available based on some criterias for each customer
Post by: GJC Web Design on August 24, 2016, 21:56:22 PM
you can check any conditions in function checkConditions()

look at some other plugins
Title: Re: Selecting shipment methods available based on some criterias for each customer
Post by: smalldragoon on August 29, 2016, 12:40:29 PM
hello
sorry, I'm a very rookie on VM and joomla
could you give me an exemple ?
as exemple, I want to display a type of standard shipment if price is above 50 euros and the payment method is paypal ?
Thx a lot