Adding price to a custom field

  • Posts: 22
  • Thank you received: 0
10 years 3 months ago #139194

-- url of the page with the problem -- : pamcoscreenprinting.com
-- HikaShop version -- : business
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

I've added a custom field to my products so a customer can add a name to be put on the back of a shirt order. I need a way to be able to charge them for that. How can I go about adding a charge? To make matters more complicated, the customer can add multiple names and i need to be able to charge for each name they enter in the custom field. Thank you, Sean

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
10 years 3 months ago #139336

Hi,

There is no option to charge for custom fields.
You have two ways to go about it:
1. The simplest is to create an option and add it to your product so that the user select the number of words he wants and that changes the price of the product and then let him enter them in the custom field. The issue with that solution is that the user might enter a different number of words than what he selected and you would have to deal with that with him manually.

2. The other solution is to create a quantity price override plugin to modify the price of the product in the cart based on the custom field. You can see the developer documentation for that here:
www.hikashop.com/support/support/documen...r-documentation.html
We actually have an example of such override plugin here:
demo.hikashop.com/index.php?option=com_h...ct&task=show&cid=214
The issue with that solution is that you need to be a developer to do it or ask one to do it for you.

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

  • Posts: 5
  • Thank you received: 0
7 years 2 months ago #262505

Hi,

I wondered if it's still the case that you need to create your own plugin to do this or if there is now a way to change the price within hikashop?

I am selling jewellery and if the customer wants it engraved it will cost them extra and they need to supply the text. I made 2 custom fields - first is "do you want engaving" (dropdown and if yes is set then show text field to enter the name) and the second is the text field to enter the name. As well as showing the text field I would like it to add £5 to the price of the product if they select yes

Thanks,
Nicole

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 1 month ago #263254

Hi,

Since the previous message in that thread (three years ago) , a plugin has been created.
Please note that plugin is only working with "order custom fields" and not with "item custom fields".
www.hikashop.com/component/hikashop/product/cid-202.html

But if you want to support the "item custom field", it would require a specific development to create a plugin dedicated to that task.
www.hikashop.com/support/documentation/6...r-documentation.html

Regards


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 64
  • Thank you received: 7
  • Hikashop Business
6 years 4 months ago #284699

Hi Jerome,

I just bought this plugin thinking this could be the solution to my problem. I overlooked the "order_custom_fields" remark and so I think I can't use this one. I don't get at what point the custom field is visible though. Because I have installed and activated etc. But the custom field is never visible. Not even on checkout. And from the documentation I understood it should be visible on checkout, so how to get this visible? And if this is not what I can use, can I cancel my order?

Thanks in advance.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 4 months ago #284700

Hello,

The plugin "Custom Field price" allow to add a price into the cart depending the value of an order custom field.
In order to let the plugin work, you first need to have some "order custom field" in your checkout.

To do so, you first need to check the configuration of your order custom field (in the "display" section you have to be sure that the field is display in the front--end) and check your checkout workflow configuration (to be sure that the "fields" block is right there).
Once you have your order custom field ; you could then see to configure an instance for the "custom field price".
If you have issues ; please provide screenshot of the order custom field configuration, some details about your website (hikashop version number) and if possible, a link.

Regarding the plugin configuration ; via "HikaShop > System > Plugins", you would be able to create a "new" instance for the "custom field price" plugin, as describe in the plugin product page description (cf link in my previous post).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 64
  • Thank you received: 7
  • Hikashop Business
6 years 3 months ago #284771

Thanks for the reply. I think I got it working now. Still not sure if this will work for what I need, but will try it first.

I don't see the custom fields in my cart on checkout though. I do see the item custom fields. How can I display the order custom fields in the checkout view?

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
6 years 3 months ago #284777

Hi,

As Jerome said, make sure that you have the "fields" block added in your "checkout workflow" in the HikaShop configuration.
Without it, the custom order fields won't display.
Also, in the settings of your custom order fields, you have a display setting for the checkout and you need to make sure it is activated.
And finally, in the custom order fields setings, you can restrict the custom fields to only some products or some categories. So that could also explain why you don't see them if you don't have the correct products in the cart based on what you configured in the custom fields settings.

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

  • Posts: 64
  • Thank you received: 7
  • Hikashop Business
6 years 3 months ago #284828

Thanks for the reply, but like I said, I see the item custom fields in the checkout, so the block is there. I also do see the order custom fields that I can fill in. But after I type the text in the fields I go to my final checkoutpage with the content in my cart. There I see the ordered product and all the item custom fields I have filled in. But I don't see the order custom fields I have filled in. How can I make them visible in the final display?

So just to clarify, I see the fields before I can fill them, but not after with the text I typed in the fields.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 3 months ago #284831

Hello,

The "fields" block that you can add in your checkout workflow just allow the edition of the fields.
For the moment, if you want to display content of the fields , it would require to override the view in order to change a part of the code behind.
With HikaShop 3.x and the new checkout system, we have in our TODO list the fact that the checkout blocks will have more settings including a "readonly" one. Unfortunately, that feature is not completed yet and it's still under development.

The item custom fields are displayed by the cart block ; they are not editable but there is a "display" setting in the item fields to indicate where you want to display them (as read only) ; like the cart module, the checkout, the emails, etc.
You also have some "display" settings for the ordre custom fields regarding the emails but there is no setting to display them as read only in the checkout since the "fields" block is there to edit them.

But since you're using HIkaShop 2.2.3 ; a lot of features that I'm talking about are not available in your version.
Either way, some override of the checkout fields block would be require if you want to just display the fields in a specific step of your checkout.

I hope that my explanation is clear enough.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 169
  • Thank you received: 2
  • Hikashop Business
5 years 8 months ago #296820

Hi, is there a chance of having plugin for "item custom fields"?
Or is there a plan to implement all this in Hikashop?

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
5 years 8 months ago #296828

Hello,

It would depend on what you want to do exactly ; what kind of "rule" you want to have for your item custom fields.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 23
  • Thank you received: 0
  • Hikashop Business
5 years 3 weeks ago #305059

Jerome:

I need this: For an item of clothing, if the customer wants embroidery, ie, Boat Name, there is an additional fee of $5 added to item price.
There will be 2-3 different options: Team Name, Boat Name, Other Personalization. Each costs $5

The ideal would be: If anything is typed into the text field, it adds $5.

But it would be OK if there was a checkbox. If checked, add $5 to item price, then I'd have a text field for them to enter the Boat Name, etc to be embroidered.

I need to do this item by item.

I'd be happy to pay for the development (in fact, have already sent 60 Euros via PayPal to start this process). Need this ASAP.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 3 weeks ago #305089

Hi,

You can configure an option for your checkbox:
www.hikashop.com/support/documentation/i...ct-form.html#options
Create a $5 product in an unpublished category with its product selection method set to checkbox and then add that product as option of the main product to get the checkbox. Then, you can create a custom item field to have the input field below the option checkbox on the product page.

Alternatively, you can have a small plugin with a custom item field to change the price of the product based on what is in the custom field once you add the product to the cart.
You can see an example of such plugin here:
www.hikashop.com/marketplace/product/146...rice-word-count.html
That plugin while multiply the price of the product by the number of words (separated by space) in a custom item field.
So, by slightly modifying that plugin, you would be to achieve what you want without the need of a checkbox.
If you have someone developing a solution for you, then, basing themselves on that plugin, it should be easy for them.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
4 years 1 month ago #315908

Hi,

For anyone reading this thread, the custom field price plugin now supports custom item fields too.

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

  • Posts: 23
  • Thank you received: 0
  • Hikashop Business
4 years 1 month ago #315910

THANKS... can you please post the URL to purchase / download latest version?

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
4 years 1 month ago #315911

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

Time to create page: 0.120 seconds
Powered by Kunena Forum