News:

Support the VirtueMart project and become a member

Main Menu

Image size, short description, dollar sign and separator placement problems.

Started by iceman3000, March 18, 2012, 05:14:42 AM

Previous topic - Next topic

iceman3000

I have fixed the image size problem where the image was being displayed on the product page in the actual size of px that original image was. I fixed this by adding this:

.main-image {
   width:350px;
}

to my css or changing the physical size of the image itself.
Problem is that when the print button is pressed the image needs to be smaller again or there is more over lapping  >:(    (image resizing tags are dropped in the print options)

For my product  I have entered the price $650. However in my shop item page it is displayed like this: Sales price: 650,00 $.
notice that it has used a comma where there should be a full stop (or "period" if your American) and the $ sign is in the wrong place
I want it to read Sales price: $650.00

The image sizing problem and Sales price problems were not present in V2.00 but appeared when i upgraded to V2.02.

I am running Joomla 2.5.2. Upgrading to 2.5.3 tonight.

Here is my product page for you to see.
http://www.homeitservices.net.au/online-store/desktop-pc-s/i3-computer-system-detail

I would also like to increase the amount of short description that is visible. At the moment it is this "Intel Core i3 - 3.1ghz, 4gb Ram, 500gb..." but it should read: "Intel Core i3 - 3.1ghz, 4gb Ram, 500gb HDD, HD Graphics"
Here is the desktop pc category page where you can see the short description.
http://www.homeitservices.net.au/online-store/desktop-pc-s

Thanks.





Nick21

Quote from: iceman3000 on March 18, 2012, 05:14:42 AM
I have fixed the image size problem where the image was being displayed on the product page in the actual size of px that original image was. I fixed this by adding this:

.main-image {
   width:350px;
}

to my css or changing the physical size of the image itself.
Problem is that when the print button is pressed the image needs to be smaller again or there is more over lapping  >:(    (image resizing tags are dropped in the print options)

For my product  I have entered the price $650. However in my shop item page it is displayed like this: Sales price: 650,00 $.
notice that it has used a comma where there should be a full stop (or "period" if your American) and the $ sign is in the wrong place
I want it to read Sales price: $650.00

When you go to currencies then to your currencie. there you can change the place of the symbol
Its set like this at the moment {number} {symbol} you make it like this {symbol} {number}


The image sizing problem and Sales price problems were not present in V2.00 but appeared when i upgraded to V2.02.

I am running Joomla 2.5.2. Upgrading to 2.5.3 tonight.

Here is my product page for you to see.
http://www.homeitservices.net.au/online-store/desktop-pc-s/i3-computer-system-detail

I would also like to increase the amount of short description that is visible. At the moment it is this "Intel Core i3 - 3.1ghz, 4gb Ram, 500gb..." but it should read: "Intel Core i3 - 3.1ghz, 4gb Ram, 500gb HDD, HD Graphics"
Here is the desktop pc category page where you can see the short description.
http://www.homeitservices.net.au/online-store/desktop-pc-s

Thanks.

iceman3000

Thankyou for your reply about the currency placement. That issue is solved. However I am still needing to know if there is a solution to the image problem, or if what I have done is the only option? and I also would like to increase the items short description preview from:


i3 Computer System
i3 - 3.1ghz, 4gb Ram, 500gb HDD, Intel...
Sales price: $ 650.00


to:


i3 Computer System
i3 - 3.1ghz, 4gb Ram, 500gb HDD, Intel HD Graphics
Sales price: $ 650.00

Thanks,
Alex.

marub

@iceman3000

there is a solution from BanquetTables.pro

file = /components/com_virtuemart/views/category/tmpl/default.php

<?php // Product Short Description
   if(!empty($product->product_s_desc)) { ?>
   <p class="product_s_desc">
   <?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 40, '...') ?>
                  </p>
                  <?php } ?>

change 40 in yours......

Marcus


iceman3000

Hi,
Thankyou for your reply, that php modification looks promising but...
This is all I have in the default.php file you specified:

<?php
/**
*
* Show the products in a category
*
* @package   VirtueMart
* @subpackage
* @author RolandD
* @author Max Milbers
* @todo add pagination
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 2710 2011-02-13 00:51:06Z Electrocity $
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

if ($this->category->haschildren) {

// Category and Columns Counter
$iCol = 1;
$iCategory = 1;

// Calculating Categories Per Row
$categories_per_row = VmConfig::get ( 'categories_per_row', 3 );
$category_cellwidth = ' width'.floor ( 100 / $categories_per_row );

// Separator
$verticalseparator = " vertical-separator";
?>

<div class="category-view">

<?php // Start the Output
if ($this->category->children ) {
    foreach ( $this->category->children as $category ) {

       // Show the horizontal seperator
       if ($iCol == 1 && $iCategory > $categories_per_row) { ?>
       <div class="horizontal-separator"></div>
       <?php }

       // this is an indicator wether a row needs to be opened or not
       if ($iCol == 1) { ?>
       <div class="row">
       <?php }

       // Show the vertical seperator
       if ($iCategory == $categories_per_row or $iCategory % $categories_per_row == 0) {
          $show_vertical_separator = ' ';
       } else {
          $show_vertical_separator = $verticalseparator;
       }

       // Category Link
       $caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );

          // Show Category ?>
          <div class="category floatleft<?php echo $category_cellwidth . $show_vertical_separator ?>">
             <div class="spacer">
                <h2>
                   <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
                   <?php echo $category->category_name ?>
                   <br />
                   <?php // if ($category->ids) {
                      echo $category->images[0]->displayMediaThumb("",false);
                   //} ?>
                   </a>
                </h2>
             </div>
          </div>
       <?php
       $iCategory ++;

       // Do we need to close the current row now?
       if ($iCol == $categories_per_row) { ?>
       <div class="clear"></div>
       </div>
          <?php
          $iCol = 1;
       } else {
          $iCol ++;
       }
    }
}
// Do we need a final closing row tag?
if ($iCol != 1) { ?>
   <div class="clear"></div>
   </div>
<?php
}
?>
</div>
<?php } ?>



I also checked the administrator/components/etc/etc/etc/default.php
and it did not have this section of code in it either.

What now?

marub

I think you have the wrong file...

folder ... /components/com_virtuemart/views/category/tmpl/default.php

at line 250

VM2.02

iceman3000

Thankyou, I was indeed in the wrong directory, I went to "categories" instead of "category".

Looks good, Cheers.