Force A Shipping Method Based On Ip Address At Checkout

Hey,

We have a physical shop and we track every order through CS Cart. We have a payment method so people can pay in cash - this way they don't have to pay any shipping fees.

We're making a change in how we work - customers can get customer cards, which automatically sign them in so their order is linked to their account (previously, we used just 1 account for this).

We need a way to force the 'cash' shipping method when we're logged in the physical shop - for that, we have an IP. Only if a order is made from that certain IP address, there should be no shipping fees.

My question is basically one of these: how can I force a shipping method at checkout (even if the user cannot technically use it) or how can I set shipping fees at €0 when ordering from a specific IP address?

Thanks in advance :)

You can do either method by using the PHP shipping hooks. You can either return only one shipping method based on your condition or you can set the "free shipping" flag for the items in the order. It is custom development, there are not administrative methods to do so. I don't believe IP address is a supported condition in promotions.

Is there any way to create additional account which can be used from this IP?

You can do either method by using the PHP shipping hooks. You can either return only one shipping method based on your condition or you can set the "free shipping" flag for the items in the order. It is custom development, there are not administrative methods to do so. I don't believe IP address is a supported condition in promotions.

Could you tell me where to look for? I've been puzzling in checkout.php, but since this is something I do for one site I'm not too familiar with how everything works yet.

Look in app/functions/fn.cart.php. You might want to use the 'get_shipping_info' hook or the 'get_shipping_info_post' hook depending on the various conditions. Given your new experience with cs-cart, I'd suggest using the hooks rather than trying to extend promotions.