Post by kriti_kostas » Fri Oct 26, 2012 6:11 pm

Hello,
I need a help from an experieneced person.
I' tried to change the theme from modernstore to fortuna but I loose some settings that I cannot find and restore now.
(the e-shop is http://www.arte-shop.gr)

2. The first and most importat is that I lost the thumbnails of subcategories. I install the subcat-images.xml and appeared but I cannot find a way and how I can put the thumbs in many lines and not on one raw that are now
παραθέτω το subcat_images.xml

Code: Select all

   <modification>
   <id>Subcategory Images</id>
   <version>1.0</version>
   <vqmver>1.2.3</vqmver>
   <author>vger.co.uk</author>
   
   <file name="catalog/controller/product/category.php">
        <operation>
            <search position="replace" index="1" offset="6"><![CDATA[
$product_total = $this->model_catalog_product->getTotalProducts($data);
            ]]></search>
            <add><![CDATA[
            if ($this->config->get('config_product_count')) {
               $product_total = $this->model_catalog_product->getTotalProducts($data);
               $image = $this->model_tool_image->resize($result['image'], 60, 60);
               $this->data['categories'][] = array(
                  'name'  => $result['name'] . ' (' . $product_total . ')',
                  'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
                  'thumb' => $image
               );                  
            } else {
               $image = $this->model_tool_image->resize($result['image'], 60, 60);
               $this->data['categories'][] = array(
                  'name'  => $result['name'],
                  'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
                  'thumb' => $image
               );                  
            }         
         }
            ]]></add>
        </operation>
   </file>
   
   <file name="catalog/view/theme/*/template/product/category.tpl">
        <operation>
            <search position="replace" index="1" offset="22"><![CDATA[
<?php if ($categories) { ?>
            ]]></search>
            <add><![CDATA[
<?php if ($categories) { ?>
<div class="box">
<div class="box-heading"><?php echo $text_refine; ?></div>
<div class="box-content">
<div class="box-product">
<?php foreach ($categories as $category) { ?>
<div>
<?php if ($category['thumb']) { ?>
<div class="image" style="text-align: left">

<ul>
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a>
</div>
<?php } ?>
<div style="text-align: left"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div></div>
<?php } ?>
</ul>

</div>
</div>
</div>
<?php } ?>
            ]]></add>
        </operation>
   </file>
   
</modification>
2. On the previous theme from instructions that I have found on this forum I could display the dimensions (height and weigth) and the SKU on category. The developer of the theme sent me an XML (I put the code here) to display the dimensions on products I have tried to modify the XML to put the dimensions and SKU to category but without success...can anyone help me?

Code: Select all

<modification>

   <id>Add product dimensions (weight, size) to product details</id>
   <version>1.0.0</version>
   <vqmver>2.1.2</vqmver>
   <author>everthemes.com</author>

   <file name="catalog/controller/product/product.php">
      
      <operation>
         <search position="after"><![CDATA[
            $this->data['text_model'] = $this->language->get('text_model');
         ]]></search>
         <add><![CDATA[
            $this->data['text_size'] = $this->language->get('text_size');
         ]]></add>
      </operation>

      <operation>
         <search position="after"><![CDATA[
            $this->data['model'] = $product_info['model'];
         ]]></search>
         <add><![CDATA[
            $this->data['length'] = number_format($product_info['length'],0) .  ' cm';
            $this->data['width'] = number_format($product_info['width'],0) .  ' cm';
            $this->data['height'] = number_format($product_info['height'],0) .  ' cm';
         ]]></add>
      </operation>

   </file>

   <file name="catalog/view/theme/*/template/product/product.tpl">
      <operation>
         <search position="after"><![CDATA[
            <span><?php echo $text_stock; ?></span> <?php echo $stock; ?>
         ]]></search>
         <add><![CDATA[
            
            <?php if ($length || $width || $height) { ?>
            <br /><span><?php echo "Διάσταση :"; ?></span> <?php echo $length; ?> x <?php echo $height; ?>
            <?php } ?>
         ]]></add>
      </operation>
   </file>

   <file name="catalog/language/english/product/product.php">
      <operation>
         <search position="before"><![CDATA[
            ?>
         ]]></search>
         <add><![CDATA[
            $_['text_size'] = 'Size (LxWxH):';
         ]]></add>
      </operation>
   </file>
   
</modification>
I'd like your help because Im trying to find a solution 3 days now
thank you
Kostas

Newbie

Posts

Joined
Thu Dec 15, 2011 4:29 am

Post by grgr » Sat Oct 27, 2012 4:00 pm

For the sub-cat images you need to add the following to your stylesheet:

.box-product {
overflow: auto;
width: 100%;
}
.box-product > div {
display: inline-block;
margin-bottom: 20px;
margin-right: 20px;
vertical-align: top;
width: 130px;
}

Image Image Image Image Image Image Image Image


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 16 guests