[Skip to main content](#vessel-content)

#   Edit order in the backend - Custom fields issue

##

- **[almika](/forum/user/15732-almika "View almika's Profile")**
- [![almika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15732.png)](/forum/user/15732-almika "View almika's Profile") Topic Author
- [ Offline](/forum/user/15732-almika)

Less More

- Posts: 382
- Thank you received: 77
-
-
-
-

10 years 8 months ago [\#231097](#231097) by [almika](/forum/user/15732-almika "View almika's Profile")  *[Edit order in the backend - Custom fields issue](/forum/35-orders-management/882564-edit-order-in-the-backend-custom-fields-issue#231097 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi,  There are many item custom fields on my site, above 80. For each product is available from 0 to 4 item custom fields. On the front end, all works fine.  The problem appears when I want to edit the order on the backend. In the popup's window for editing product there are all my item custom fields. And the same is in the popup's window for adding product to order.  Thank you forward")* was created by *[almika](/forum/user/15732-almika "View almika's Profile")*

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8

Hi,

There are many item custom fields on my site, above 80.
For each product is available from 0 to 4 item custom fields.
On the front end, all works fine.

The problem appears when I want to edit the order on the backend.
In the popup's window for editing product there are all my item custom fields.
And the same is in the popup's window for adding product to order.

Thank you forward

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MjU2NC1lZGl0LW9yZGVyLWluLXRoZS1iYWNrZW5kLWN1c3RvbS1maWVsZHMtaXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Farida](/forum/user/39293-farida "View Farida's Profile")**
- [![Farida's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39293.png)](/forum/user/39293-farida "View Farida's Profile")
- [ Offline](/forum/user/39293-farida)

Less More

- Posts: 11
- Thank you received: 1
-
-
-

10 years 8 months ago [\#231143](#231143) by [Farida](/forum/user/39293-farida "View Farida's Profile")  Replied by *[Farida](/forum/user/39293-farida "View Farida's Profile")* on topic *[Edit order in the backend - Custom fields issue](/forum/35-orders-management/882564-edit-order-in-the-backend-custom-fields-issue#231143 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi,  There are many item custom fields on my site, above 80. For each product is available from 0 to 4 item custom fields. On the front end, all works fine.  The problem appears when I want to edit the order on the backend. In the popup's window for editing product there are all my item custom fields. And the same is in the popup's window for adding product to order.  Thank you forward")*

Hello,

It's normal that the item custom fields are display in the editing product popup and the adding product popup.
With that, the administrator is able to set value from back end, while it's not possible in the front end.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MjU2NC1lZGl0LW9yZGVyLWluLXRoZS1iYWNrZW5kLWN1c3RvbS1maWVsZHMtaXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[almika](/forum/user/15732-almika "View almika's Profile")**
- [![almika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15732.png)](/forum/user/15732-almika "View almika's Profile") Topic Author
- [ Offline](/forum/user/15732-almika)

Less More

- Posts: 382
- Thank you received: 77
-
-
-
-

10 years 8 months ago [\#231186](#231186) by [almika](/forum/user/15732-almika "View almika's Profile")  Replied by *[almika](/forum/user/15732-almika "View almika's Profile")* on topic *[Edit order in the backend - Custom fields issue](/forum/35-orders-management/882564-edit-order-in-the-backend-custom-fields-issue#231186 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi,  There are many item custom fields on my site, above 80. For each product is available from 0 to 4 item custom fields. On the front end, all works fine.  The problem appears when I want to edit the order on the backend. In the popup's window for editing product there are all my item custom fields. And the same is in the popup's window for adding product to order.  Thank you forward")*

Hi, **Farida**

I may be not clear to describe it above.
The problem is that **all** item custom fields are display in popup, not only item custom fields allowed for the product.

Thank you in any case

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MjU2NC1lZGl0LW9yZGVyLWluLXRoZS1iYWNrZW5kLWN1c3RvbS1maWVsZHMtaXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

10 years 8 months ago [\#231189](#231189) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Edit order in the backend - Custom fields issue](/forum/35-orders-management/882564-edit-order-in-the-backend-custom-fields-issue#231189 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi,  There are many item custom fields on my site, above 80. For each product is available from 0 to 4 item custom fields. On the front end, all works fine.  The problem appears when I want to edit the order on the backend. In the popup's window for editing product there are all my item custom fields. And the same is in the popup's window for adding product to order.  Thank you forward")*

Hi,

That's also normal.
There is no "restriction" on fields when you edit a order item ; because the product might have been modified since the order creation so we display all fields.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MjU2NC1lZGl0LW9yZGVyLWluLXRoZS1iYWNrZW5kLWN1c3RvbS1maWVsZHMtaXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[almika](/forum/user/15732-almika "View almika's Profile")**
- [![almika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15732.png)](/forum/user/15732-almika "View almika's Profile") Topic Author
- [ Offline](/forum/user/15732-almika)

Less More

- Posts: 382
- Thank you received: 77
-
-
-
-

10 years 8 months ago [\#231298](#231298) by [almika](/forum/user/15732-almika "View almika's Profile")  Replied by *[almika](/forum/user/15732-almika "View almika's Profile")* on topic *[Edit order in the backend - Custom fields issue](/forum/35-orders-management/882564-edit-order-in-the-backend-custom-fields-issue#231298 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi,  There are many item custom fields on my site, above 80. For each product is available from 0 to 4 item custom fields. On the front end, all works fine.  The problem appears when I want to edit the order on the backend. In the popup's window for editing product there are all my item custom fields. And the same is in the popup's window for adding product to order.  Thank you forward")*

Hi,

I do not understand why you need to show the fields that are specified for other products.
Furthermore, after saving the information, all the fields appear in the order, even if nothing is changed.

Look at the screenshots:

1. The product page. There are two item custom fields. All is fine.
2. The checkout page. All is fine too.
3. The order's show on user control panel. All is fine too.
4. The popup to edit product. I just save it whithout editing.
5. The order's show on user control panel after previous step. All fields are here.

And if I try to add new product to the order I get all fields in order show again.

Hope your help

Regards

- [ ![img&#95;product&#95;page.png](/forum/attachment/29759) ](/forum/attachment/29759 "...oduct&#95;page.png") [ ](/forum/attachment/29759?download=1 "...oduct&#95;page.png")
- [ ![img&#95;checkout.png](/forum/attachment/29760) ](/forum/attachment/29760 "img&#95;checkout.png") [ ](/forum/attachment/29760?download=1 "img&#95;checkout.png")
- [ ![img&#95;order&#95;show.png](/forum/attachment/29761) ](/forum/attachment/29761 "...order&#95;show.png") [ ](/forum/attachment/29761?download=1 "...order&#95;show.png")
- [ ![img&#95;admin&#95;order&#95;product&#95;edit.png](/forum/attachment/29762) ](/forum/attachment/29762 "...oduct&#95;edit.png") [ ](/forum/attachment/29762?download=1 "...oduct&#95;edit.png")
- [ ![img&#95;order&#95;show&#95;after&#95;edit.png](/forum/attachment/29763) ](/forum/attachment/29763 "...after&#95;edit.png") [ ](/forum/attachment/29763?download=1 "...after&#95;edit.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MjU2NC1lZGl0LW9yZGVyLWluLXRoZS1iYWNrZW5kLWN1c3RvbS1maWVsZHMtaXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

10 years 7 months ago -  10 years 8 months ago [\#231355](#231355) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Edit order in the backend - Custom fields issue](/forum/35-orders-management/882564-edit-order-in-the-backend-custom-fields-issue#231355 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi,  There are many item custom fields on my site, above 80. For each product is available from 0 to 4 item custom fields. On the front end, all works fine.  The problem appears when I want to edit the order on the backend. In the popup's window for editing product there are all my item custom fields. And the same is in the popup's window for adding product to order.  Thank you forward")*

Hello,

Farida and Jerome have already told you everything, is it normal that **ALL** custom fields are displayed.

Let's take an example :
- You have an order with a product that works with only **2** custom field **A &amp; B**
- But later after this order, you add a new custom field (**C**) in your product configuration.
- You want edit your order and more especially this product, **AND** we choose to only kept linked custom fields in the order.
**As result** : your database only write these **2** custom field **A &amp; B** and so you won't be able to modify your product with his **new** custom field **C**.

And so the most simple is to have **ALL** custom field to don't lock your future management evolution.

Hope this will answer your question.

Regards,

Last edit: 10 years 8 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MjU2NC1lZGl0LW9yZGVyLWluLXRoZS1iYWNrZW5kLWN1c3RvbS1maWVsZHMtaXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[almika](/forum/user/15732-almika "View almika's Profile")**
- [![almika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15732.png)](/forum/user/15732-almika "View almika's Profile") Topic Author
- [ Offline](/forum/user/15732-almika)

Less More

- Posts: 382
- Thank you received: 77
-
-
-
-

10 years 7 months ago -  10 years 7 months ago [\#231495](#231495) by [almika](/forum/user/15732-almika "View almika's Profile")  Replied by *[almika](/forum/user/15732-almika "View almika's Profile")* on topic *[Edit order in the backend - Custom fields issue](/forum/35-orders-management/882564-edit-order-in-the-backend-custom-fields-issue#231495 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8  Hi,  There are many item custom fields on my site, above 80. For each product is available from 0 to 4 item custom fields. On the front end, all works fine.  The problem appears when I want to edit the order on the backend. In the popup's window for editing product there are all my item custom fields. And the same is in the popup's window for adding product to order.  Thank you forward")*

Hi,

Thank you all for your attention.
I wrote code to solve my problem.

I edit the backend's view 'order edit_products' for isis temlate.

The line #60:
Code:

foreach($this-&gt;fields['item'] as $fieldName =&gt; $oneExtraField) {

Instead of it I insert:
Code:

//almika I begin echo '&lt;script type="text/javascript"&gt; jQuery(document).ready(function($) { $(".almika_remove").click(function() { $("input[name=\'almikacheckbox\']").each(function(i, val) { if (!val.checked) { $("."+$(val).attr(\'class\')).remove(); } $(val).remove(); }); $(".almikalable").remove(); }); }); &lt;/script&gt;'; echo '&lt;a href="#" class="almika_remove btn"&gt;Delete unchecked&lt;/a&gt;&lt;br /&gt;'; //almika I end foreach($this-&gt;fields['item'] as $fieldName =&gt; $oneExtraField) { //almika II begin if(!empty($this-&gt;orderProduct-&gt;$fieldName) &amp;&amp; strlen($this-&gt;orderProduct-&gt;$fieldName)) { $almikachecked = ' checked="checked"'; } else { $almikachecked = ''; } echo '&lt;input type="checkbox" name="almikacheckbox" class="hikashop_order_product_customfield_'.$fieldName.'"'.$almikachecked.'&gt;&lt;label class="almikalable"&gt;'.$fieldName.'&lt;/label&gt;'; //almika II end

Now I can check custom fields to save to the product. The non empty fields are checked by default.
Then I can delete unchecked fields. To do this it is necessary to click 'Delete unchecked'.

Thus the edited product has only fields that you want to give it.

It works for me.

Best regards

Last edit: 10 years 7 months ago by [almika](/forum/user/15732-almika "View almika's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4MjU2NC1lZGl0LW9yZGVyLWluLXRoZS1iYWNrZW5kLWN1c3RvbS1maWVsZHMtaXNzdWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.329 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
