custom input text field in product view increasing the final price if any text

  • Posts: 9
  • Thank you received: 0
7 years 5 months ago #271917

-- HikaShop version -- : Essential: 3.1.1
-- Joomla version -- : 3.7.2
-- PHP version -- : 5.6.20
-- Browser(s) name and version -- : 58.0.3029.110 (64-bit) Mac

Dear support

I know that I need to purchase the Business edition to use custom input text boxes in the products view (item), but still need to know first if this is posible:

I need to create a custom input text in the product view to the user input his name to customize the product and this will increase the final price if any text has filled in

so if the text input is empty then price doesnt change unless he writes some text on it so it will increase price of the product

many thanks
danny

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 5 months ago #271921

Hi,

There is no pre-made system to add a fixed amount to the price of the product based on whether something has been entered in a custom item field or not.
However, we do provide a "donation" plugin which can take the value entered in a custom field and replace the product price with it:
demo.hikashop.com/index.php/en/hikashop/...t-page/donation-page
So it would require modifying the code of that plugin.
You would have to change all the instances of:

hikashop_toFloat($product->$column)
to:
hikashop_toFloat($product->prices[$k]->price_value + XX)
where XX is the amount to add to the product. That change is to be done in plugins/system/custom_price/custom_price.php
Then the donation plugin will behave like you need it to.

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

  • Posts: 9
  • Thank you received: 0
7 years 5 months ago #271972

Thanks for the update, what I really need is the user to fill in the field some text instead an amount like his name or a color etc and if that field contains any text then applies the different price for it
will it be possible using the plugin for the donations?
many thanks
mixes

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 5 months ago #271975

Hi,

With that plugin and the modification I gave in my previous message, it will be possible yes.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum