Is it possible not to display the image areas when there is no image for the product?

06.09.2011 22:23
#1
megangel1
Joomshopping forum user no avatar
Name: Mike Carden
05.09.2011
Posts: 2
Quote
Is it possible not to display the image areas when there is no image for the product?

I have products that are services rather than something physical.
I therefore want to display my products without any image place holders that appear when there is no image.
Is this possible?

Thanks

 
06.09.2011 22:45
#2
raziel70
Joomshopping forum user no avatar
Name: raziel70
09.07.2011
Posts: 36
Quote
Aw: Is it possible not to display the image areas when there is no image for the product?

Yesterday I met the same problem.
Unfortunately, the solution is not found in the settings, so I modified the php file.
I think this is the only solution to this problem.

 
07.09.2011 08:24
#3
megangel1
Joomshopping forum user no avatar
Name: Mike Carden
05.09.2011
Posts: 2
Quote
Aw: Is it possible not to display the image areas when there is no image for the product?

Thanks for the pointer, I'll hunt the necessary changes down :)

 
07.09.2011 20:56
#4
raziel70
Joomshopping forum user no avatar
Name: raziel70
09.07.2011
Posts: 36
Quote
Aw: Is it possible not to display the image areas when there is no image for the product?

A little help, if you not find the thing what must be modify.
Search this file: components/com_jshopping/templates/default/product/product_default.php
In this php file on the top (10th row) can you see a table block, with the 'class="jshop" '.
This table contains the information on the top of the frontend site. Pictures, videos and more added things.
I deleted the total table, because i no need it. :D
But if you want display any information in this block, then do not delete the total table.
......>...later

I have solved this problem, my friend! :)

Change the original snippet:

<?php if(!count($this->images)){?>
<img id = "main_image" src = "<?php print $this->image_product_path?>/<?php print $this->noimage?>" alt = "<?php print htmlspecialchars($this->product->name)?>" />
<?php }?>
<?php foreach($this->images as $k=>$image){?>
<a class="lightbox" id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($image->image_full!=$this->product->product_full_image){?>style="display:none"<?php }?>>
<img id = "main_image_<?php print $image->image_id?>" src = "<?php print $this->image_product_path?>/<?php print $image->image_name;?>" alt = "<?php print htmlspecialchars($this->product->name)?>" />
</a>
<?php }?>


to this one:


<?php if(!count($this->images == 0)){?>
<img id = "main_image" src = "<?php print $this->image_product_path?>/<?php print $this->noimage?>" alt = "<?php print htmlspecialchars($this->product->name)?>" />
<?php }else{?>
<?php foreach($this->images as $k=>$image){?>
<a class="lightbox" id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($image->image_full!=$this->product->product_full_image){?>style="display:none"<?php }?>>
<img id = "main_image_<?php print $image->image_id?>" src = "<?php print $this->image_product_path?>/<?php print $image->image_name;?>" alt = "<?php print htmlspecialchars($this->product->name)?>" />
</a>
<?php }?>
<?php }?>

I think the changes you see? :)
This change is only for images!
If you do not set image to the article, there will be no image displayed.


Letzte Änderung: 07.09.2011 23:26
 
13.02.2012 02:35
#5
amheng
Joomshopping forum user no avatar
Name: Alana Heng
02.12.2011
Posts: 2
Quote
Aw: Is it possible not to display the image areas when there is no image for the product?

I finally figured out which file to edit to remove images from Product listing and cart pages:

Product Listing:
components/com_jshopping/templates/default/list_products/product.php

Remove this code:
<td class="image">
<?php if ($product->image){?>
<div class="image_block">
<?php if ($product->label_id){?>
<div class="product_label">
<?php if ($product->_label_image){?>
<img src="<?php print $product->_label_image?>" alt="<?php print htmlspecialchars($product->_label_name)?>" />
<?php }else{?>
<span class="label_name"><?php print $product->_label_name;?></span>
<?php }?>
</div>
<?php }?>
<a href="<?php print $product->product_link?>">
<img class="jshop_img" src="<?php print $product->image?>" alt="<?php print htmlspecialchars($product->name);?>" />
</a>
</div>
<?php }?>

<?php if ($this->allow_review){?>
<table class="review_mark"><tr><td><?php print showMarkStar($product->average_rating);?></td></tr></table>


<div class="count_commentar">
<?php print sprintf(_JSHOP_X_COMENTAR, $product->reviews_count);?>
</div>
<?php }?>
<?php print $product->_tmp_var_bottom_foto;?>
</td>

For the Cart pages:
components/com_jshopping/templates/default/cart/cart.php

Again remove these codes:

<th width = "20%">
<?php print _JSHOP_IMAGE?>
</th>

<td class = "jshop_img_description_center">
<a href = "<?php print $prod['href']; ?>">
<img src = "<?php print $this->image_product_path ?>/<?php if ($prod['thumb_image']) print $prod['thumb_image']; else print $this->no_image; ?>" alt = "<?php print htmlspecialchars($prod['product_name']);?>" class = "jshop_img" />
</a>
</td>


Hope this helps.


Joomla: 2.5
 


Copyrights MAXXmarketing GmbH. All Rights Reserved
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.