uploaded pic not uploading in canvas on product listing page

  • Posts: 42
  • Thank you received: 0
  • Hikashop Business
1 month 5 days ago #365880

-- HikaShop version -- : 5.1.5
-- Joomla version -- : 5.2.3
-- PHP version -- : 8.3.16
-- Browser(s) name and version -- : chrome

I have a custom field of ajax_img type labelled as "Picture_Upload" to upload a picture on product listing page. I have replaced the product image with a canvas to display the uploaded picture so that customer can customize the image but the uploaded picture is not getting displayed in canvas at all.

Also have can i access this custom field in code? {$product->Picture_upload} something like this?

Please help.

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

  • Posts: 83512
  • Thank you received: 13511
  • MODERATOR
1 month 5 days ago #365883

Hi,

You have javascript code to control your canvas. And the uploaded image is available directly after the upload is done.
What I would do in your case is to use setTimeout to periodically list the elements with the class "hikashop_upload_imagethumb_small" on the page. And once you find any, you can look for an img tag within that element. The src attribute of that img tag will contain the URL of the uploaded image, which you can directly include in your canvas.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum