Improve upload image for custom field

  • Posts: 66
  • Thank you received: 2
  • Hikashop Business
11 years 8 months ago #127043

-- url of the page with the problem -- : www.canvascool.com
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.x
-- PHP version -- : 5x.x
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : Error_message

I am interested in improving the upload image field functionality for the custom field. Is it possible to use an external extension which could allow one to upload multiple images for ex.?

Thank you in advance if anynone can help.

Rds

Eric

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

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #127055

Hi,

Yes it is.
In HikaShop 2.2.x we integrated new features for creating custom fields by plugins.
HikaMarket uses it to have some custom fields for his own tables and with the new "date picker" we create a new kind of custom field in a plugin (which include his own options, etc).

The custom field system in HikaShop is now more than flexible, you can totally extend it using plugins.
Our developer documentation is not up to date for the new triggers but if you have some question about how implement a new custom field, we will answer it with great pleasure.

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.
The following user(s) said Thank You: epware

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

  • Posts: 66
  • Thank you received: 2
  • Hikashop Business
11 years 8 months ago #127141

Thank you for your message. Do you know of a good reliable uploade extension/plug-in one can use with Hikashop which would allow the following features and ease implementation:

- Picture preview
- Multiple picture upload
- Delete picture

Thank you in advance

Eric

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

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #127187

Hi,

Actually I don't remember that this kind of plugin for the custom fields have been created.

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

  • Posts: 66
  • Thank you received: 2
  • Hikashop Business
11 years 8 months ago #127487

Hello

I installed the Jsmallfib plugin which could suite my needs. As stated in their doucmentation I placed {jsmallfib} in an article and the plug-in works as you can see here: www.canvascool.com/jml/index.php/accueil/uploader

Now I would like it to work on a product page in order to improve the uploader field option (for ex. allow user to upload multiple files).
I don't see how I can use this feature with the custom field as you stated.

I place the key work {jsmallfib} in view/product/show_default but nothing happens either.

I don't know if you can help but that would be great! :)

Thank you in advance

Last edit: 11 years 8 months ago by epware.

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

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #127534

Hi,

Jsmallfib is a Joomla content plugin. So it works good in joomla articles but an HikaShop product page is not an article.
You have to use some little PHP code in order to display it in the product page, thanks to a view override.
They are a lot of thread which talk about the problem. Here the first found with a little search: "hikashop module product page"
www.hikashop.com/forum/4-how-to/34371-di...uct-pages.html#34400

More than that, you have to understand that this nice uploader is not compatible with the HikaShop custom field system.
To be honest, it won't work as you are expecting and it will be never the case unless you made a lot of modification in the code of the Jsmallfib.
When I said that the custom field system can be extended using plugins, I didn't say that it work directly with "content plugins" or any other joomla plugin. It has a specific structure and a compatible plugin should respect the requirements.
What I said is, it is possible to extend the system but it requires PHP and Development skills, that's why I mentioned the developer documentation. Because it's a developer task.

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: 66
  • Thank you received: 2
  • Hikashop Business
11 years 8 months ago #127551

I found another plug in and this works on the product page. It's called GW File Upload.

It is not as nice as the other but I can scale from it. It works on the page but I get these error message:

Strict Standards: Non-static method FileUpload::createDir() should not be called statically, assuming $this from incompatible context in D:\www\www412\jml\plugins\content\file_upload\file_upload.php on line 95 Strict Standards: Non-static method FileUpload::createFile() should not be called statically, assuming $this from incompatible context in D:\www\www412\jml\plugins\content\file_upload\file_upload.php on line 97 Strict Standards: Non-static method FileUpload::createDir() should not be called statically, assuming $this from incompatible context in D:\www\www412\jml\plugins\content\file_upload\file_upload.php on line 95 Strict Standards: Non-static method FileUpload::createFile() should not be called statically, assuming $this from incompatible context in D:\www\www412\jml\plugins\content\file_upload\file_upload.php on line 97 Strict Standards: Non-static method FileUpload::createDir() should not be called statically, assuming $this from incompatible context in D:\www\www412\jml\plugins\content\file_upload\file_upload.php on line 95 Strict Standards: Non-static method FileUpload::createFile() should not be called statically, assuming $this from incompatible context in D:\www\www412\jml\plugins\content\file_upload\file_upload.php on line 97

Where can I find the "uploader" code in hikashop. I really need to find a way to improve the uploader.

Thank you in advance

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
11 years 8 months ago #127603

These are not real errors but just notifications of PHP that the code is old.
If you don't want to see them, you can just turn off the "error reporting" option of the joomla configuration (that should be the case anyway for any live website for security reasons).

The default uploader code of custom fields in hikashop can be found in the file administrator/components/com_hikashop/classes/field.php

The following user(s) said Thank You: epware

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

Time to create page: 0.058 seconds
Powered by Kunena Forum