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

#   adding please select to custom field drop down issue

##

- **[ronron](/forum/user/40399-ronron "View ronron's Profile")**
- [![ronron's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bad_baby.jpg)](/forum/user/40399-ronron "View ronron's Profile") Topic Author
- [ Offline](/forum/user/40399-ronron)

Less More

- Posts: 490
- Thank you received: 2
-
-

9 years 10 months ago [\#259225](#259225) by [ronron](/forum/user/40399-ronron "View ronron's Profile")  *[adding please select to custom field drop down issue](/forum/23-market-how-to/888257-adding-please-select-to-custom-field-drop-down-issue#259225 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : none  hi  attached is my custom field settings.  what i wish is for the vendor to select an option from the drop down. if he does not the system will call an error from the please select with no value.  im having the following errors  Warning: Creating default object from empty value in /home.../administrator/components/com&#95;hikamarket/classes/product.php on line 92  Warning: Attempt to assign property of non-object in /home.../components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 43  Warning: Attempt to assign property of non-object in /home...components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 42.  how can i have a please select option that will call an error if vendor does not pick from the drop down  thanks")* was created by *[ronron](/forum/user/40399-ronron "View ronron's Profile")*

-- HikaShop version -- : 2.6.4
-- HikaMarket version -- : 1.7.2
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none

hi

attached is my custom field settings.

what i wish is for the vendor to select an option from the drop down. if he does not the system will call an error from the please select with no value.

im having the following errors

Warning: Creating default object from empty value in
/home.../administrator/components/com_hikamarket/classes/product.php on line 92

Warning: Attempt to assign property of non-object in /home.../components/com_hikamarket/views/productmarket/tmpl/form_image.php on line 43

Warning: Attempt to assign property of non-object in /home...components/com_hikamarket/views/productmarket/tmpl/form_image.php on line 42.

how can i have a please select option that will call an error if vendor does not pick from the drop down

thanks

- [ ![Screenshot-please&#95;2017-01-11.png](/forum/attachment/35514) ](/forum/attachment/35514 "...2017-01-11.png") [ ](/forum/attachment/35514?download=1 "...2017-01-11.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg4MjU3LWFkZGluZy1wbGVhc2Utc2VsZWN0LXRvLWN1c3RvbS1maWVsZC1kcm9wLWRvd24taXNzdWU/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: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

9 years 10 months ago [\#259231](#259231) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[adding please select to custom field drop down issue](/forum/23-market-how-to/888257-adding-please-select-to-custom-field-drop-down-issue#259231 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : none  hi  attached is my custom field settings.  what i wish is for the vendor to select an option from the drop down. if he does not the system will call an error from the please select with no value.  im having the following errors  Warning: Creating default object from empty value in /home.../administrator/components/com&#95;hikamarket/classes/product.php on line 92  Warning: Attempt to assign property of non-object in /home.../components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 43  Warning: Attempt to assign property of non-object in /home...components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 42.  how can i have a please select option that will call an error if vendor does not pick from the drop down  thanks")*

Hi,

Is that working in the HikaShop backend ?

Regards,

---

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

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

- **[ronron](/forum/user/40399-ronron "View ronron's Profile")**
- [![ronron's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bad_baby.jpg)](/forum/user/40399-ronron "View ronron's Profile") Topic Author
- [ Offline](/forum/user/40399-ronron)

Less More

- Posts: 490
- Thank you received: 2
-
-

9 years 10 months ago [\#259329](#259329) by [ronron](/forum/user/40399-ronron "View ronron's Profile")  Replied by *[ronron](/forum/user/40399-ronron "View ronron's Profile")* on topic *[adding please select to custom field drop down issue](/forum/23-market-how-to/888257-adding-please-select-to-custom-field-drop-down-issue#259329 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : none  hi  attached is my custom field settings.  what i wish is for the vendor to select an option from the drop down. if he does not the system will call an error from the please select with no value.  im having the following errors  Warning: Creating default object from empty value in /home.../administrator/components/com&#95;hikamarket/classes/product.php on line 92  Warning: Attempt to assign property of non-object in /home.../components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 43  Warning: Attempt to assign property of non-object in /home...components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 42.  how can i have a please select option that will call an error if vendor does not pick from the drop down  thanks")*

yes, its working perfectly in the back end.

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg4MjU3LWFkZGluZy1wbGVhc2Utc2VsZWN0LXRvLWN1c3RvbS1maWVsZC1kcm9wLWRvd24taXNzdWU/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: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

9 years 10 months ago [\#259374](#259374) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[adding please select to custom field drop down issue](/forum/23-market-how-to/888257-adding-please-select-to-custom-field-drop-down-issue#259374 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : none  hi  attached is my custom field settings.  what i wish is for the vendor to select an option from the drop down. if he does not the system will call an error from the please select with no value.  im having the following errors  Warning: Creating default object from empty value in /home.../administrator/components/com&#95;hikamarket/classes/product.php on line 92  Warning: Attempt to assign property of non-object in /home.../components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 43  Warning: Attempt to assign property of non-object in /home...components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 42.  how can i have a please select option that will call an error if vendor does not pick from the drop down  thanks")*

Hi,

Replace Code:

$product = $fieldsClass-&gt;getInput('product', $oldProduct, true, 'data', false, 'display:vendor_product_edit'); // 'all'); if(empty($product)) $ret = false;

By Code:

$product = $fieldsClass-&gt;getInput('product', $oldProduct, true, 'data', false, 'display:vendor_product_edit'); // 'all'); if(empty($product)) { $product = $_SESSION['hikashop_product_data']; $ret = false; }

And it will remove the warning.

Regards,

---

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

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

- **[ronron](/forum/user/40399-ronron "View ronron's Profile")**
- [![ronron's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bad_baby.jpg)](/forum/user/40399-ronron "View ronron's Profile") Topic Author
- [ Offline](/forum/user/40399-ronron)

Less More

- Posts: 490
- Thank you received: 2
-
-

9 years 9 months ago -  9 years 9 months ago [\#259557](#259557) by [ronron](/forum/user/40399-ronron "View ronron's Profile")  Replied by *[ronron](/forum/user/40399-ronron "View ronron's Profile")* on topic *[adding please select to custom field drop down issue](/forum/23-market-how-to/888257-adding-please-select-to-custom-field-drop-down-issue#259557 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : none  hi  attached is my custom field settings.  what i wish is for the vendor to select an option from the drop down. if he does not the system will call an error from the please select with no value.  im having the following errors  Warning: Creating default object from empty value in /home.../administrator/components/com&#95;hikamarket/classes/product.php on line 92  Warning: Attempt to assign property of non-object in /home.../components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 43  Warning: Attempt to assign property of non-object in /home...components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 42.  how can i have a please select option that will call an error if vendor does not pick from the drop down  thanks")*

hi

i tried this but the errors are still appearing.

i edited this file
/.../administrator/components/com_hikamarket/classes/product.php

i'm not sure if this is the file because no file was mentioned.

out of curiosity i tried this change
Code:

$product = $fieldsClass-&gt;getInput('product', $oldProduct, true, 'data', false, 'display:vendor_product_edit'); // 'all'); if(empty($product)) $ret = false;

to this
Code:

$product = $fieldsClass-&gt;getInput('product', $oldProduct, true, 'data', false, 'display:vendor_product_edit'); // 'all'); if(empty($product)) return false;

and it worked. not sure what it does but it worked.

what should i do? thanks

Last edit: 9 years 9 months ago by [ronron](/forum/user/40399-ronron "View ronron's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg4MjU3LWFkZGluZy1wbGVhc2Utc2VsZWN0LXRvLWN1c3RvbS1maWVsZC1kcm9wLWRvd24taXNzdWU/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: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#259586](#259586) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[adding please select to custom field drop down issue](/forum/23-market-how-to/888257-adding-please-select-to-custom-field-drop-down-issue#259586 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.5 -- Error-message(debug-mod must be tuned on) -- : none  hi  attached is my custom field settings.  what i wish is for the vendor to select an option from the drop down. if he does not the system will call an error from the please select with no value.  im having the following errors  Warning: Creating default object from empty value in /home.../administrator/components/com&#95;hikamarket/classes/product.php on line 92  Warning: Attempt to assign property of non-object in /home.../components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 43  Warning: Attempt to assign property of non-object in /home...components/com&#95;hikamarket/views/productmarket/tmpl/form&#95;image.php on line 42.  how can i have a please select option that will call an error if vendor does not pick from the drop down  thanks")*

Hi,

The fact that we are using a variable to mark the element as failed is for a reason.
Putting a "return" for sure will not show you any message but it will also not stored the data into the session to re-show them to the user in the front-end ; so everything he wrote for the product is being lost.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg4MjU3LWFkZGluZy1wbGVhc2Utc2VsZWN0LXRvLWN1c3RvbS1maWVsZC1kcm9wLWRvd24taXNzdWU/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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.056 seconds

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