X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Thumbnail size in xc5 (https://forum.x-cart.com/showthread.php?t=69263)

tony_sologubov 04-02-2015 05:55 AM

Re: Thumbnail size in xc5
 
Hello,

You need to extend the \XLite\View\ItemsList\Product\Customer\ACustomer class instead of \XLite\View\ProductBox one. Please, let me know if it works out for you.

Tony

flipp2k 04-02-2015 08:47 AM

Re: Thumbnail size in xc5
 
Thanks for the response Tony. As a temporary fix I went ahead and disabled the image re-sizing from the image.tpl template file.

Tomek 05-04-2015 09:07 PM

Re: Thumbnail size in xc5
 
Hi Tony,

Thanks for the instructions. I have followed them and made the changes.

It didn't work and found that some of the directory listings are not the same for the version I'm using.

Ver. 5.2.4 (recently updated)

All I want to do is enlarge the "product_thumbnail" in the subcategories.php?

(I hope these are the right terminology)

Any tips, guidance would be appreciated as there is not much info on the latest version.

Cheers, Tom


Quote:

Originally Posted by tony_sologubov
Thanks for sending me the module.

The correct implementation of the \XLite\Module\Dev-ID\Module-ID\View\Subcategories class should be as follows:

PHP Code:

<?php

namespace XLite\Module\Dev-ID\Module-ID\View;

abstract class 
Subcategories extends \XLite\View\Subcategories implements \XLite\Base\IDecorator
{
    public function 
setWidgetParams(array $params)
    {
        
parent::setWidgetParams($params);

        
$this->widgetParams[static::PARAM_ICON_MAX_WIDTH]->setValue(300);
        
$this->widgetParams[static::PARAM_ICON_MAX_HEIGHT]->setValue(300);
    }
}


In other words, you should decorate the setWidgetParams() method instead of defineWidgetParams() one.


tony_sologubov 05-05-2015 02:36 AM

Re: Thumbnail size in xc5
 
Hello @Tomek,

Could you please send me the module you wrote? I will try to point the problem.

Tony

Tomek 05-05-2015 05:14 PM

Re: Thumbnail size in xc5
 
Thanks Tony for your quick response.
I have not written a module.
All I did, was edit the source files (of course made backups and restored back to original afterwards)
Fairly new to this, so might not understand all the jargon and how to's.

Tom

totaltec 05-05-2015 05:18 PM

Re: Thumbnail size in xc5
 
Tomek,
I have a simple tutorial that may help you tremendously: https://www.youtube.com/watch?v=jGmeHJKP_c8

You do not edit anything in the core files. You always create a module for use in your store.

Tony also has a webinar recording about creating a module: https://www.youtube.com/watch?v=mOzC7mknjwQ

And this KB article: http://kb.x-cart.com/display/XDD/Step+1+-+creating+simplest+module

You may also find X-Cart 5 SDK useful: http://kb.x-cart.com/display/XDD/X-Cart+SDK

Tomek 05-06-2015 04:58 AM

Re: Thumbnail size in xc5
 
Thanks Totaltec for all the information.

The first video definitely explains what needs to be done. So easy to understand!

Will need to go through a learning curve now and will let you now later how I go.

In the meantime, if there are any more simple tutorials, please post them,

Cheers, Tomek.

Tomek 05-19-2015 03:45 AM

Re: Thumbnail size in xc5
 
Thank you Tony and totaltec for your help in this forum.

Once I understood about custom templates, the rest was fairly simple.

Cheers!


All times are GMT -8. The time now is 02:27 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.