Blog posts tagged with 'Pickup'

RSS
Prevent showing shipping methods when there are products that require pickup in store- Sunday, October 29, 2023

NopCommerce won't show the "Pickup in store" if all items in the cart have shipping disabled.

In Shipping Director, you can workaround that by using an Unpublished Category - e.g., "Pickup Only".  First, be sure to select shipping enabled on the product (and add the product to the category).  Then SD can show an error message in the cart (and prevent checkout from continuing) if the cart contains any such item:

ErrorExit

Check pickup only

Items.Any(Product.HasCategory("Pickup Only"))

"Sorry, you have product(s) that require pickup in store."

Be sure to sequence (order / line #)  that ErrorExit rule before Option type rules.

Note that the above is using Items.Any() so if cart contains any "pickup only" items, the customer must backup to select Pickup.  Thta's because nopCommerce by default shows the "Pickup" checkbox in the shipping address page.  However, there is a setting that will instead show the "Pickup" checkbox in the shipping methods page.  In Administration > Settings > All Settings, search for ordersettings.displaypickupinstoreonshippingmethodpage, Edit it and change the Value to True.  Then when you have the above ErrorExit, the customer would see this in the shipping method selection page:


Tags :  Pickup
Comments (0)