A Conditional Product Surcharge?

  • Posts: 146
  • Thank you received: 4
2 weeks 3 days ago #368648

-- HikaShop version -- : 6.1

I have a customer who owns 3 pawn shops, and wants to sell products online which may include firearms. In the U.S., these items can't be shipped directly to the customer, but can be transferred to a licensed firearm dealer anywhere in the country ( this is called an FFL Transfer, and includes a base surcharge - usually $25 ). There will also be one location where customers can pick up the firearm directly without an FFL Transfer fee.

Products which require a FFL Transfer belong to their own Subcategory within the "firearms" Category. I have already customized the checkout to display a notice if one of these items is in the customer's cart, so I have code to loop through the cart and test for those items.

A ) The shop is willing restrict any single order to a single FFL Transfer destination, so I have a custom DB table to store dealers (over 50,000 of them) and am currently planning to store the customer's preference in a Hikashop custom field appended to the Customer table, so that they will have a recallable preference for future orders. Each Order will store the destination requested for that particular order.

B ) The firearms themselves will be listed as "virtual goods" so that a Shipping Address will be required only if the order contains something other than firearms. Only 1 of the customer's 3 shop locations can allow customers to pickup a firearm after a purchase, so I could test the FFL ID field for that value.

C ) Since the Customer's Hikashop Shipping address may not be known during the order, my tentative plan right now is to add a custom field to the Item, with the pawn shop's FFL ID as the default value for all firearms. It's going to take a tricky javascript driven modal selector to make it simpler to choose an FFL Dealer by providing first the state, then the city and finally a MUCH shorter dropdown of FFL Licensed businesses.


I suspect that there will be three scenarios:

An order with only firearms - which will require no Shipping address and a chosen FFL Dealer ID attached to each Order along with a FFL Transfer surcharge for each firearm.

An order with no firearms - which will require a Shipping address or possibly a PickUp shipping at any of the three pawn shop locations.

An order with firearms AND non-firearm items - which will require a Shipping address AND a chosen FFL Dealer ID attached to each Order along with a FFL Transfer surcharge for each firearm.


I've read about the Custom Field price plugin, and think it might work here. I think the best way to make this happen is to count the number of Firearms in the cart and place that value in a hidden custom field for the Order -- then ONLY IF the Customer Pickup for that one free shop location is not chosen for the order, to calculate that fee value based upon that hidden custom field value.

Where does an order-based fee created by this plugin appear on an invoice? Is the fee created by the plugin treated as a new Item? As a discount applied after the subtotal line? I do not know if the fee needs to be taxable.

Thank you for your information and advice.

Last edit: 2 weeks 3 days ago by icomex.

Please Log in or Create an account to join the conversation.

  • Posts: 84497
  • Thank you received: 13739
  • MODERATOR
2 weeks 2 days ago #368652

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.

The following user(s) said Thank You: icomex

Please Log in or Create an account to join the conversation.

  • Posts: 146
  • Thank you received: 4
2 weeks 1 day ago #368663

Thank you for a very thorough and promising strategy. I will give it a shot, and let you know how it goes.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum