Post by newbiee » Thu Oct 24, 2013 1:09 am

Hi,

I would like to add Image thumbnails for every main category. I have found this thread dealing with images for subcategories: http://forum.opencart.com/viewtopic.php ... 60#p268278

My problem is, that I don't know how to "load" thumbnails from database. I added a new column and filled it with data from PHPMyAdmin, but where to edit the sql select to load the column while loading other categories columns?

Code: Select all

ALTER TABLE `category` ADD `thumbnail` VARCHAR( 255 ) NOT NULL
I've tried:

Code: Select all

<modification>
    <id>Category Thumbnails Add Vqmod Script</id>
    <version>1.0a</version>
    <vqmver>2.4.1</vqmver>
    <file name="catalog/controller/product/category.php">
      <operation>
        <search position="after"><![CDATA[
        foreach ($results as $result) {
        ]]></search>
        <add><![CDATA[
        print_r($result);
        ]]></add>
      </operation>
    </file>
</modification>
But there is no data.

Newbie

Posts

Joined
Thu Oct 24, 2013 1:01 am

Post by butte » Fri Oct 25, 2013 6:23 am

You can already set images in categories, notwithstanding whether you also make them parents (categories) or successive levels of children (subcategories). There are already fields (= columns) for image(s) and for additional images. You can moreover make or amend those assignments via JNeuhoff's free export/import tool right into or out of the spreadsheet (ditto using other tools for export/import or for databases). Why are you trying to reinvent that part of the Gewerken?

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: Amazon [Bot] and 19 guests