I want to be able to flag products using custom product definitions that identify if a product requires a particular shipping method. I have some products that need to be signed for so I only want the 'Signed for' shipping method to be available when the product is found in the basket.
I had a look at using IShippingMethodService however this only seems to be for calculating shipping costs after a shipping method has been selected.
Has anyone done anything that allows you to determine what shipping methods are displayed for particular products in the basket?
I guess there's no need to extend the Library. But if you want you could easily make an extention method. Take a look in dotpeek how it's done internal. You should keep in mind that there's also countries and shops configured on a shipping method, so you should filter on that too. But your in the right direction. You could simply, as you point out yourself, add a shipping method definition that holds the specific shipping method name and then extract it by that.
I think what I am going to do is check against the order lines to see if a product has been checked as special delivery with a Product Definition field and then only display shipping methods that match hard coded shipping method names. Its a bit of a hack however will do the trick at the moment.
Extending TransactionLibrary.GetShippingMethods()
I want to be able to flag products using custom product definitions that identify if a product requires a particular shipping method. I have some products that need to be signed for so I only want the 'Signed for' shipping method to be available when the product is found in the basket.
I had a look at using IShippingMethodService however this only seems to be for calculating shipping costs after a shipping method has been selected.
Has anyone done anything that allows you to determine what shipping methods are displayed for particular products in the basket?
Cheers,
Marc
I guess there's no need to extend the Library. But if you want you could easily make an extention method. Take a look in dotpeek how it's done internal. You should keep in mind that there's also countries and shops configured on a shipping method, so you should filter on that too. But your in the right direction. You could simply, as you point out yourself, add a shipping method definition that holds the specific shipping method name and then extract it by that.
Hi Morton,
I think what I am going to do is check against the order lines to see if a product has been checked as special delivery with a Product Definition field and then only display shipping methods that match hard coded shipping method names. Its a bit of a hack however will do the trick at the moment.
Cheers,
Marc
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.