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

#   add custom product thumbnail to the cart

##

- **[jean-loup](/forum/user/40284-jean-loup "View jean-loup's Profile")**
- [![jean-loup's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/40284-jean-loup "View jean-loup's Profile") Topic Author
- [ Offline](/forum/user/40284-jean-loup)

Less More

- Posts: 176
- Thank you received: 8
-
-

9 years 7 months ago -  9 years 7 months ago [\#266299](#266299) by [jean-loup](/forum/user/40284-jean-loup "View jean-loup's Profile")  *[add custom product thumbnail to the cart](/forum/27-checkout/889616-add-custom-product-thumbnail-to-the-cart#266299 "-- url of the page with the problem -- :   www.121time.com  -- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.22 -- Browser(s) name and version -- : chrome  Dear Team  We have a website where customised products are added to the cart, all products being unique (watches)  We developed a module where we could integrate and add each product to the basket without any issues. But we cannot add the image/thumbnail (generated by our server in png) of the custom product and attach it to the related product in the cart.  We added in our helper file the code below. Can you see an obvious reason or could give us a few tricks how we can add the visual of the product in the cart also?  Thank you in advance for your help  Jean-Loup")* was created by *[jean-loup](/forum/user/40284-jean-loup "View jean-loup's Profile")*

-- url of the page with the problem -- : [ www.121time.com](http://www.121time.com)
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6.22
-- Browser(s) name and version -- : chrome

Dear Team

We have a website where customised products are added to the cart, all products being unique (watches)

We developed a module where we could integrate and add each product to the basket without any issues. But we cannot add the image/thumbnail (generated by our server in png) of the custom product and attach it to the related product in the cart.

We added in our helper file the code below. Can you see an obvious reason or could give us a few tricks how we can add the visual of the product in the cart also?

Thank you in advance for your help

Jean-Loup Code:

$image = new stdClass(); $image-&gt;file_ref_id = $result; $image-&gt;file_type = 'product'; $image-&gt;file_path = $imageURL; $fileClass = hikashop_get('class.file'); $id = $fileClass-&gt;save($image); $product-&gt;images = array($id); $productClass-&gt;updateFiles($product,$result,'images');

Last edit: 9 years 7 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

9 years 7 months ago [\#266318](#266318) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[add custom product thumbnail to the cart](/forum/27-checkout/889616-add-custom-product-thumbnail-to-the-cart#266318 "-- url of the page with the problem -- :   www.121time.com  -- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.22 -- Browser(s) name and version -- : chrome  Dear Team  We have a website where customised products are added to the cart, all products being unique (watches)  We developed a module where we could integrate and add each product to the basket without any issues. But we cannot add the image/thumbnail (generated by our server in png) of the custom product and attach it to the related product in the cart.  We added in our helper file the code below. Can you see an obvious reason or could give us a few tricks how we can add the visual of the product in the cart also?  Thank you in advance for your help  Jean-Loup")*

Hi,

HikaShop cannot handle a URL in the file_path column of a file entry of the type "product".
It has to be a relative path from the upload folder to the image.
So if your upload folder is images/com_hikashop/upload/, like it is by default, and that you have an image called myimage.jpg in it, the you just need to specify the file name in that file_path column.

The rest of your code looks good to me.

The following user(s) said Thank You: [jean-loup](/forum/user/40284-jean-loup "View jean-loup's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4OTYxNi1hZGQtY3VzdG9tLXByb2R1Y3QtdGh1bWJuYWlsLXRvLXRoZS1jYXJ0P3RtcGw9bWFya2Rvd24=) 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.044 seconds

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