Change Price based on custom field quantity number

  • Posts: 49
  • Thank you received: 1
4 years 7 months ago #310055

-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9
-- PHP version -- : 7.2

Hello,

I downloaded custom_quantity plugin, enabled it and followed the instruction.

I went to hikashop -> custom fields and created a new field under item table " which I found out after debugging that the table name for this item table is #__hikashop_cart_product, regardless, the creation of the custom field was successful, however, there is no option to add a price for this custom field based on how many they want from this item.

I also noticed after I deleted this custom field, it wasn't deleted from the database, so I went and deleted it manually from the database.

Now, please, let me give you an example: let's say I sell tents, and chairs, or some other accessories with this tent, like lights ...etc.

Let's say the basic price of the tent is $5000 USD and the price of one chair is $20 USD, I want the user to be able to add how many chairs they want and the price should be added to the tent price, could you please let me know if this is possible and/or if there is a plugin for it? I am not sure if the purpose of the plugin I installed is for my needs.

I look forward to hearing from you ASAP.

Regards,
Rei

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

  • Posts: 12953
  • Thank you received: 1778
4 years 7 months ago #310076

Hello Rei,

Let's say the basic price of the tent is $5000 USD and the price of one chair is $20 USD, I want the user to be able to add how many chairs they want and the price should be added to the tent price, could you please let me know if this is possible and/or if there is a plugin for it? I am not sure if the purpose of the plugin I installed is for my needs.


The custom quantity plugin will just enable you to add a custom quantity input based on the product you want to add to your cart.

In your case a solution will be to directly edit the code of the custom_price plugin so that it will add your custom amount ($20) x the custom quantity to the total price of the product.

We wish you a nice day!
Kind regards,
Mohamed Thelji.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum