Search for shipping option by zipcode or name

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 ano atrás
Hi again New York

I have now created a jquery/webservice solution that will search for any parcel shop by zipcode and it lists it just like when doing a regular load of the shipping methods.
I can also select the shop and in the CheckoutController I see the right name in selected item.

My problem now is that when Nop will use my new selected parcel shop, it validates it agains a list of shops, found by the current customer address.
This means that unless the search is the same as the default, it cannot find the shop and will return to the same page again.

Do you have an idea on how to get passed that Nop validation, or to load other parcel shops than related to the customer address?

Best regards,
Axel
1 ano atrás
Hi
The GLS Pakkeshop plugin I have made, is just getting x number of Pakkeshops out from the customers delivery address. If they want delivery to another city where they might work, they just set the work address as delivery address then the list of shops will be based on the work address and not home address.
The same for the ShipMondo plugin I have made. Customer selects the shipping option wanted, Then when I need to print a label then it´s based on the selected Shippingoptions carrier and shopID (DAO/BRING/GLS/PostNord).
But if you make a solution with a small Widget for entering a ZIP code and maybe amount of shops to list then I´m interested in the solution :-)
1 ano atrás
TCH wrote:
Hi
The GLS Pakkeshop plugin I have made, is just getting x number of Pakkeshops out from the customers delivery address. If they want delivery to another city where they might work, they just set the work address as delivery address then the list of shops will be based on the work address and not home address.
The same for the ShipMondo plugin I have made. Customer selects the shipping option wanted, Then when I need to print a label then it´s based on the selected Shippingoptions carrier and shopID (DAO/BRING/GLS/PostNord).
But if you make a solution with a small Widget for entering a ZIP code and maybe amount of shops to list then I´m interested in the solution :-)


Hi, that is actually what have made.
Small widget with just a label and a input field with a keyup event attached.
When ever you enter at least 4 digit the search will be done, and return with the result presented within 300 ms. (amount is configurable)

I just have this problem that I dont know how to make the CheckoutController load this new list so it will recognize that the selection is valid.

Best regards,
Axel
1 ano atrás
AxelAndersen wrote:
... make the CheckoutController load this new list so it will recognize that the selection is valid...

Please indicate your version of nopCommerce, and on what lines of code in the CheckoutController that this validation is done.
1 ano atrás
New York wrote:
... make the CheckoutController load this new list so it will recognize that the selection is valid...
Please indicate your version of nopCommerce, and on what lines of code in the CheckoutController that this validation is done.


Hi

Its version 4.50.4 and in line 880 in CheckoutController.cs the selected name is compared to names of the list.
Looks like this

            var shippingOption = shippingOptions
                .Find(so => !string.IsNullOrEmpty(so.Name) && so.Name.Equals(selectedName, StringComparison.InvariantCultureIgnoreCase));
            if (shippingOption == null)
                return await ShippingMethod();


This is where my solution will enter the ShippingMethod() and then reload the same view again.

Best regards,
Axel
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.