User enterable custom product fields.
- brainforge
-
Topic Author
- Offline
When displaying the product I could not see a way for the customer to enter their own value - it only displays what the shop owner entered when creating the product.
Also would it be possible for a customer to enter their reference, add product to cart, change the reference and add the product to the cart again. It would show as 2 lines in the cart/order - each with a different reference.
The values the customer entered would need to be available in the data structures of the on / after order triggers for passing to the back-end.
Additionally the custom product fields could be added to the order_product table in as well as the product table.
Selectable option? - default as current, option to add field to order_product table.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
Custom fields of the table "product" are only to display information to the user, not to let him set a value for a product. That can be done with custom fields of the table "item". That enables users to enter a value and then they can add that product to the cart. Then, if they enter another value int he custom item field and add the product again to the cart, the get a second line in their cart for their second value.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
The item custom field will do the job.
See you have recently added a Category custom field - I might also have a use for that shortly.
For the item custom fields in my case I will need to modify the product / order templates to achieve the following:
(a) Hide / show item custom fields for individual products on product pages.
(b) Hide / show item custom fields for individual products on checkout / order listing.
(c) Limit maximum quantity per order to 1 for each item custom field unique value.
Both of these can be controlled by using product custom fields.
Could these features be added to your wishlist for core Hikashop functionality please.
Please Log in or Create an account to join the conversation.
- brainforge
-
Topic Author
- Offline
Create a product with maximum number in order set to 1.
Create a custom item.
Product can be added to cart more than once PROVIDED THAT each time the product is added the value entered by the customer in the custom item field is unique.
Only one niggle when trying to reuse a custom item value - the pop-up says product successfully added to cart - a bit confusing that, would be nice for message to say something like 'item already in cart'.
Please Log in or Create an account to join the conversation.
As you say, creating a cusotm field of the product product, then editing the views in order to add a check to display the custom item fields or not based on the custom product field.
you should only have to do that on the product page. In the latest version, custom item fields should not be displayed on the checkout if empty.
For the last problem you raised, that's indeed the case. The system is not yet smart enough for that. We'll have to look at that in the future.
Please Log in or Create an account to join the conversation.
- Posts: 9
- Thank you received: 0
How can I get around this issue. I also have add-to-cats buttons elsewhere in the system where this problem is also occuring. Is there a way to edit a custom field for an item at checkout?
Thanks.
Please Log in or Create an account to join the conversation.
You can always edit the different views of HikaShop via the menu Display->Views and change the code for that to work, that's possible, but that means really heavy modifications.
Please Log in or Create an account to join the conversation.
- Posts: 9
- Thank you received: 0
Please Log in or Create an account to join the conversation.
On the checkout, you can have custom fields of the table "order", but they are for the whole order.
Please Log in or Create an account to join the conversation.
- Posts: 9
- Thank you received: 0
Please Log in or Create an account to join the conversation.
I got question, it doesn't have to see with the topic in discussion. When I adding a new product in Hikashop I'd like to use different letters form (you know bold, italic, fontsize etc) even put some color in the letters and increase the size, how can I add that function to my hikashop is it possible ? Just like the toolbox that you can see in this form above.
Thanks
Sam
Please Log in or Create an account to join the conversation.
Custom fields allows you to create this feature.
In "Display -> custom fields" you can create a new field for "product" (with column name "custom_name" for example)
Select a "text" custom field and set "no" to the Front-end display.
After that, you have to edit the product display view and change code where the product name is displayed via the menu Display->Views.
So, in your new custom field (which is hidden in the front-end) you can set a new name which could contain some HTML code.
You won't have any conflict with the rest of HikaShop system because the name of the product (without formating) will be used.
product/show.php
After that, in the back-end, you could assign an HTML formatting name to your product. Name which would be used just in the product/show (or in other views if you modify it).
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.
Please Log in or Create an account to join the conversation.
- Posts: 9
- Thank you received: 0
Please Log in or Create an account to join the conversation.
There is a last name and a first name for addresses of users in HikaShop. Is that what you want ?
In that case you need to edit the file show of the view product via the menu Display->Views and add the code below at the beginning of the file, after the first <?php tag :
$addressClass = hikashop::get('class.address');
$addresses = $addressClass->getByUser(hikashop::loadUser());
if($addresses){
$address = reset($addresses);
$this->element->alt_member_name = $address->address_firstname.' '.$address->address_lastname;
}
Please Log in or Create an account to join the conversation.
- Posts: 9
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 9
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.