Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Too much white space around product images.

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #11  
Old 10-01-2014, 05:03 AM
 
GreatLakesVacuum GreatLakesVacuum is offline
 

eXpert
  
Join Date: Jan 2009
Posts: 286
 

Default Re: Too much white space around product images.

I don't understand how things like this are still not in version 5 after 16 updates?

I mean the problem is we can't launch with the ridiculously tiny images that X-Cart suggests we use, we aren't running our website on watch screens.

I am scared of all the custom modules (and them being lumped together) because they will get broken all the time by updates.

I would vastly prefer that X-Cart add these features that are so simple, so vital, and were ALREADY IN 4.X.

But yeah, short of that I may just need to have it coded as a custom module. At least I know a great guy for that job.
__________________
X-Cart 4.5.4 Gold (Live Business Site)
X-Cart 5.1.9 Business (In Development Now)
Reply With Quote

The following user thanks GreatLakesVacuum for this useful post:
totaltec (10-01-2014)
  #12  
Old 10-22-2014, 06:56 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Too much white space around product images.

Hey Mike, I've tried your example and I can not get the sizes of the pictures to change.

PHP Code:
<?php

namespace XLite\Module\XC\CustomSkin\View\ItemsList\Product\Customer;

abstract class 
ACustomer extends \XLite\Module\CDev\Sale\View\ItemsList implements \XLite\Base\IDecorator
{
    protected function 
getIconSizes()
    {
        return array(
            static::
WIDGET_TYPE_SIDEBAR '.' . static::DISPLAY_MODE_STHUMB => array(200200),
            static::
WIDGET_TYPE_SIDEBAR '.' . static::DISPLAY_MODE_BTHUMB => array(200200),
            static::
WIDGET_TYPE_CENTER '.' . static::DISPLAY_MODE_GRID => array(200200),
            static::
WIDGET_TYPE_CENTER '.' . static::DISPLAY_MODE_LIST => array(200200),
            
'other' => array(110110),
        );
    }
}
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #13  
Old 10-23-2014, 05:24 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Too much white space around product images.

Quote:
Originally Posted by minfinger
Hey Mike, I've tried your example and I can not get the sizes of the pictures to change.
Can you provide a link to the page?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #14  
Old 10-23-2014, 05:29 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Too much white space around product images.

I've got it open for now if you want to take a look.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #15  
Old 10-23-2014, 05:39 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Too much white space around product images.

Sorry I forgot the link http://lpo.myyamahas.com/
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #16  
Old 10-23-2014, 06:27 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Too much white space around product images.

Mike,

I'd rather have this as a module, because I have intentions of making a settings page for it. Also I don't want to get a bunch of mods together in the custom skin. I don't think that will work for me.

Anyway, here's the packed up version of the mod. All it does is screw up the whole site at this point.
https://www.dropbox.com/s/zdjnzjt6e5no5hh/FasterThanYours-LargerThumbnails-v5_1_6.tar?dl=0
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #17  
Old 10-25-2014, 08:15 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Too much white space around product images.

I figured it out. Instead of "public static function getIconSizes()" I had "protected function getIconSizes()"

It works now.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote

The following user thanks minfinger for this useful post:
totaltec (10-26-2014)
  #18  
Old 10-26-2014, 02:49 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Too much white space around product images.

Starting with 5.1.6, this code suggestion no longer works. It is because you are not supposed to decorate a decorator. This code works for me instead:
Code:
<?php namespace XLite\Module\XC\CustomSkin\View\Items_List\Product\Customer; /** * ACustomer */ abstract class ACustomer extends \XLite\View\ItemsList\Product\Customer\ACustomer implements \XLite\Base\IDecorator { /** * Get icon sizes * * @return array */ public static function getIconSizes() { return array( static::WIDGET_TYPE_SIDEBAR . '.' . static::DISPLAY_MODE_STHUMB => array(200, 200), static::WIDGET_TYPE_SIDEBAR . '.' . static::DISPLAY_MODE_BTHUMB => array(200, 200), static::WIDGET_TYPE_CENTER . '.' . static::DISPLAY_MODE_GRID => array(200, 200), static::WIDGET_TYPE_CENTER . '.' . static::DISPLAY_MODE_LIST => array(200, 200), 'other' => array(110, 110), ); } }
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #19  
Old 10-26-2014, 03:31 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Too much white space around product images.

Well now that I've actually figured out how this decorator crap works I may get to changing more stuff. Seems pretty easy.

In order to make the pictures fit on a 2 column Lisa in I had to go to 380,0. 0 snugged to whites right to the top/bottom border, which I think has about a 5px space anyway.

Any idea on the CSS coding for the price and other other things in the table? All the text looks funny now.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #20  
Old 12-28-2014, 08:18 AM
  dagdag's Avatar 
dagdag dagdag is offline
 

Advanced Member
  
Join Date: Sep 2014
Location: Volgograd
Posts: 81
 

Default Re: Too much white space around product images.

Quote:
Originally Posted by totaltec
Okay here is what I did.

I used the custom skin module, (for the second time today!) and I created a new file:
XLite\Module\XC\CustomSkin\View\Items_List\Product \Customer\ACustomer.php

with the following content:

Code:
namespace XLite\Module\XC\CustomSkin\View\Items_List\Product\Customer; /** * ACustomer */ abstract class ACustomer extends \XLite\Module\CDev\Sale\View\ItemsList implements \XLite\Base\IDecorator { /** * Get icon sizes * * @return array */ public static function getIconSizes() { return array( static::WIDGET_TYPE_SIDEBAR . '.' . static::DISPLAY_MODE_STHUMB => array(200, 200), static::WIDGET_TYPE_SIDEBAR . '.' . static::DISPLAY_MODE_BTHUMB => array(200, 200), static::WIDGET_TYPE_CENTER . '.' . static::DISPLAY_MODE_GRID => array(200, 200), static::WIDGET_TYPE_CENTER . '.' . static::DISPLAY_MODE_LIST => array(200, 200), 'other' => array(110, 110), ); } }

This set the icon sizes to 200. Amazingly, XC was smart enough to automatically generate icon thumbs at the correct size of 200 x 200, referenc them correctly, and place them in the var/images folder. Thanks Devs!
it's work!, however

module Add2CartPopup also uses the icons of the new large size and its design breaks

temporally in classes\XLite\Module\XC\Add2CartPopup\View\Product s.php i use this code:
Code:
protected function defineWidgetParams() { ... $this->widgetParams[self::PARAM_ICON_MAX_WIDTH]->setValue(180); $this->widgetParams[self::PARAM_ICON_MAX_HEIGHT]->setValue(180); }
but how do I do it right?
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:28 PM.

   

 
X-Cart forums © 2001-2020