Hi,
The custom field price plugin is developed by Obsidev, not us. So I don't know it well. I know it has some limitations. Especially on conditions like the one you need.
I would rather recommend the cart fees plugin:
www.hikashop.com/marketplace/product/279-cart-fee.html
It allows for extra fees to be added to the cart. You can use a formula with tags and mathematical operations to calculate the fee amount, and you can also add conditions with tags and mathematical operations to restrict a fee being applied.
In both cases, the fee uses the "additional fee" system of HikaShop, which adds the extra fee between the subtotal and the total of the products list of an order.
I would personally have setup HikaShop like this in your case:
- I would have created a warehouse for firearms products and one for other products, with weight for all the products.
- In each product, I would have selected the corresponding warehouse
- Then, I would have created one set of shipping methods for each warehouse (with the corresponding warehouse selected in the shipping methods)
- For the non firearms warehouses I would have created one or several shipping methods for normal shipping, and 3 shipping methods, one for each pickup place, with their "override shipping address" setting activated (that way the shipping address would be removed for these).
- For the firearms warehouses, I would have created one shipping method with the surcharge fees directly added to it and its "override shipping address" setting also activated. And if you need different shipping methods for different firearms in order to have different surcharge fees, it's possible by activating the "shipping price per product" setting of the shipping method(s) and then configuring the surcharge fees in each product.
- I would also place the shipping method selection before the address area in the checkout as it makes more sense since some shipping methods don't require a shipping address.
- I would also have developed a small plugin to implement the Fields API of our developer documentation page to create a field as a combination of 3 dropdowns to select the state, city and shop, with some JS code to refresh the dropdowns based on the others selection. The shop dropdown containing the selected shop would get the standard HikaShop input name so that HikaShop can handle and store the selection.
- Then, I would have created a custom field of the table "order" and of that custom type with its "shipping methods" setting restricted to the firearms warehouse.
The use of warehouses allow for automatically offering one set of shipping methods or the other set or both based on the products in the cart.
The override of the shipping address allows for hiding / displaying the address area automatically when needed.
The custom order field for the shop selection for firearm products allow for minimal development as you only need to handle the selection of the shop. The rest (display or hidding of the custom field based on the selected shipping method, saving of the selection in the order, display of the selection in emails, invoice, etc) is taking care of by HikaShop.