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

#   Change the image code

##

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

Less More

- Posts: 17
- Thank you received: 0
-
-

8 years 5 months ago -  8 years 5 months ago [\#291703](#291703) by [chavosh](/forum/user/50388-chavosh "View chavosh's Profile")  *[Change the image code](/forum/33-customers/894524-change-the-image-code#291703 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.6  Hi I want to put the code below for the image. Thank you")* was created by *[chavosh](/forum/user/50388-chavosh "View chavosh's Profile")*

-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.6

Hi
I want to put the code below for the image.
Thank you Code:

&lt;!--- image --&gt; &lt;?php if(!isset($element-&gt;alias)) $element-&gt;alias = ''; $link = hikashop_contentLink('product&amp;task=show&amp;cid='.$element-&gt;product_id.'&amp;name='.$element-&gt;alias.$url_itemid,$element); ?&gt; &lt;div class="compare_image"&gt; &lt;?php if(!empty($element-&gt;images)) { $image = reset($element-&gt;images); if(!$this-&gt;config-&gt;get('thumbnail')) { echo '&lt;img src="'.$this-&gt;image-&gt;uploadFolder_url.$image-&gt;file_path.'" alt="'.$image-&gt;file_name.'" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" /&gt;'; } else { $height = $this-&gt;config-&gt;get('thumbnail_y'); $width = $this-&gt;config-&gt;get('thumbnail_x'); $style=''; if(count($element-&gt;images)&gt;1){ if(!empty($height)){ $style=' style="height:'.($height+5).'px;"'; } } ?&gt; &lt;div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div" &lt;?php echo $style;?&gt; &gt; &lt;a href="&lt;?php echo $link; ?&gt;" title="&lt;?php echo $this-&gt;escape($element-&gt;product_name); ?&gt;"&gt; &lt;?php $image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside')); $img = $this-&gt;image-&gt;getThumbnail(@$image-&gt;file_path, array('width' =&gt; $width, 'height' =&gt; $height), $image_options); if($img-&gt;success) { echo '&lt;img class="hikashop_product_compare_image" title="'.$this-&gt;escape(@$image-&gt;file_description).'" alt="'.$this-&gt;escape(@$image-&gt;file_name).'" src="'.$img-&gt;url.'"/&gt;'; } ?&gt; &lt;/a&gt; &lt;/div&gt; &lt;?php } } ?&gt; &lt;/div&gt;

src="'.$img-&gt;url.'"

Change to

sub.domain.com/images/

Code:

&lt;div class="hikashop_product hikashop_product_column_1 hikashop_product_row_1" style="width: &lt;?php echo $col . '%'; ?&gt;"&gt; &lt;div data-container="product-grid" class="hikashop_container product-item-info {?thumbnail}{:else} no-image {/thumbnail}"&gt; &lt;div class="product-item-details hikashop_subcontainer thumbnail"&gt; &lt;div class="hikashop_listing_img_title"&gt; &lt;div class="hikashop_product_image"&gt; &lt;div class="hikashop_product_image_subdiv"&gt; &lt;a tabindex="-1" class="product-item-photo" href="{url}" style="height: &lt;?php echo $thumbnail_y; ?&gt;px"&gt; &lt;img alt="{name&#124;s}" src="&lt;?php echo 'https://sub.domain.com/images/'; ?&gt;{thumbnail}" class="product-image-photo"&gt; &lt;/a&gt; &lt;/div&gt;

Last edit: 8 years 5 months ago by [chavosh](/forum/user/50388-chavosh "View chavosh's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTQ1MjQtY2hhbmdlLXRoZS1pbWFnZS1jb2RlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86281
- Thank you received: 14262
-
-

8 years 5 months ago [\#291736](#291736) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Change the image code](/forum/33-customers/894524-change-the-image-code#291736 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.6  Hi I want to put the code below for the image. Thank you")*

Hi,

Ok, but then what is your question exactly ?

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

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

Less More

- Posts: 17
- Thank you received: 0
-
-

8 years 5 months ago -  8 years 5 months ago [\#291776](#291776) by [chavosh](/forum/user/50388-chavosh "View chavosh's Profile")  Replied by *[chavosh](/forum/user/50388-chavosh "View chavosh's Profile")* on topic *[Change the image code](/forum/33-customers/894524-change-the-image-code#291776 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.6  Hi I want to put the code below for the image. Thank you")*

Hi
I want the pictures of the comparison part Like the filter section, read the download host.
Thank you
Code:

https://www.mehrazart.ir/index.php?option=com_hikashop&amp;ctrl=product&amp;task=compare&amp;cid[]=156 https://www.mehrazart.ir/index.php?option=com_jamegafilter&amp;amp;view=default&amp;amp;id=1&amp;amp;jalayout=default&amp;amp;itemperrow=3&amp;amp;itempercol=4&amp;amp;fullpage=0&amp;amp;sticky=1&amp;amp;scrolltop=1&amp;amp;autopage=0&amp;amp;direction=sb-horizontal&amp;amp;Itemid=471#sort=position&amp;sortdir=desc&amp;attr.category.value=15&amp;page=1

- [ ![1&#95;2018-04-24.jpg](/forum/attachment/43473) ](/forum/attachment/43473 "1&#95;2018-04-24.jpg") [ ](/forum/attachment/43473?download=1 "1&#95;2018-04-24.jpg")
- [ ![2&#95;2018-04-24.jpg](/forum/attachment/43474) ](/forum/attachment/43474 "2&#95;2018-04-24.jpg") [ ](/forum/attachment/43474?download=1 "2&#95;2018-04-24.jpg")

Last edit: 8 years 5 months ago by [chavosh](/forum/user/50388-chavosh "View chavosh's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTQ1MjQtY2hhbmdlLXRoZS1pbWFnZS1jb2RlP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86281
- Thank you received: 14262
-
-

8 years 5 months ago [\#291801](#291801) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Change the image code](/forum/33-customers/894524-change-the-image-code#291801 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.6  Hi I want to put the code below for the image. Thank you")*

Hi,

So if I understand correctly, you want to use the original image instead of the resized thumbnail on the comparison page of the products ?
In that case, it's quite easy.
You need to edit the file "compare" of the view "product" via the menu Display&gt;Views and change the code:
$img-&gt;url
to:
$img-&gt;origin_url

The following user(s) said Thank You: [chavosh](/forum/user/50388-chavosh "View chavosh's Profile")

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

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

[](#top)
