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

Modifying a 4.4.1 skin questions...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 12-27-2010, 11:13 AM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Modifying a 4.4.1 skin questions...

That is just it. It has BOTH images....

One in the file T/ and one in P/

When I changed the script above and you click the thumbnail it always gives me the thumbnail view...

But....when I right click in the browser and ask to view image it selects the correct image.
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
  #22  
Old 12-29-2010, 01:21 PM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Modifying a 4.4.1 skin questions...

Understanding how these tables work is beyond me.

I can't understand how everything works together.

I change two things.....
Quote:
{if $image_x ne 0} width="{$image_x}"{/if}
{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" />


To this and when clicking on Thumbnails you DON'T get the full image.

Quote:
{if $image_x ne 0} width="{150px}"{/if}
{if $image_y ne 0} height="{150px}"{/if} alt="{$product|escape}" />


Also now the table seems to want to move to the right AND give me uneven margins or padding from top to bottom.

All I wanted was a table with images evenly spaced and when the images were clicked then it would take you the next page with the full product description.

I have enclosed image examples of the working full size image with just changing the above code.

Also enclosed is the thumbnail table file....maybe it would have been easier to just rebuild the file then try to change the existing file to do what I want.

Any ideas?
Attached Thumbnails
Click image for larger version

Name:	Untitled-3.jpg
Views:	123
Size:	115.8 KB
ID:	2264  Click image for larger version

Name:	Untitled-4.jpg
Views:	119
Size:	286.7 KB
ID:	2265  
Attached Files
File Type: tpl products_t.tpl (6.3 KB, 88 views)
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
  #23  
Old 12-29-2010, 01:38 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Modifying a 4.4.1 skin questions...

Change this

Quote:
{if $image_x ne 0} width="{150px}"{/if}
{if $image_y ne 0} height="{150px}"{/if} alt="{$product|escape}" />

to this
Quote:

{if $image_x ne 0} width="150px"{/if}
{if $image_y ne 0} height="150px"{/if} alt="{$product|escape}" />
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #24  
Old 12-29-2010, 01:49 PM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Modifying a 4.4.1 skin questions...

Steve,

Sorry I should have said this. I actually tried in numerous ways and you are correct, your method is the correct way but it still does not resolve the issue when selecting the thumbnail that the larger image defaults to the thumbnail.
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
  #25  
Old 12-29-2010, 02:41 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Modifying a 4.4.1 skin questions...

Not sure what you are trying to do, I just pointed out an error in your code.
Also if that code is used when showing the image it will set the image width/height to 150px/150px no matter what the actual dimensions are. That's why in the original code you have "$image_x/$image_y" which will default to the original image dimensions. Not sure what you are trying to do here
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #26  
Old 12-29-2010, 03:14 PM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Modifying a 4.4.1 skin questions...

Steve,

Thanks for answering.

That is exactly what I thought. I created thumbnails and the thumbnails were vertical or horizontal but I wanted square thumbnails.

So I then exported all the images and modified the pngs to square format.

With this code: The images still remained vertical or horizontal in the thumbnails regardless of the actual image size.

Quote:
{if $image_x ne 0} width="{$image_x}"{/if}
{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" />


So then I changed code above to the below code:

The thumbnails now showed correctly but when you click the thumbnail and go to view the larger image it ALSO shows the thumbnail.

Quote:
{if $image_x ne 0} width="150px"{/if}
{if $image_y ne 0} height="150px"{/if} alt="{$product|escape}" />

Strangest thing...

Go to the Site and click on one of the thumbnails. You will see that you get the exact thumbnail in the main product page.

Now right click on the image and click VIEW IMAGE. It shows the correct image.

I thought maybe a cache issue but I cleared my cache and still nothing.

Thanks.
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
  #27  
Old 12-29-2010, 03:33 PM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Modifying a 4.4.1 skin questions...

I think I see what its doing.

It is also changing the size on the image in the product page to...150px x 150px...

So it is using the same dimensions in the product_thumbnail.tpl regardless of the image size.

Any idea?
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
  #28  
Old 12-29-2010, 03:39 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Modifying a 4.4.1 skin questions...

And this is exactly why it is happening. The code in product template is (or similar to this)
Quote:
{include file="product_thumbnail.tpl" productid=$product.image_id image_x=$product.image_x image_y=$product.image_y product=$product.product|escape tmbn_url=$product.image_url id="product_thumbnail" type=$product.image_type}

Note "image_x" and "image_y" which are assigned actual product image dimensions (main image not thumbnail). These values are passed to product_thumbnail.tpl to use as image dimensions. But you changed the code in that template to use exact values (150/150) so the actual image dimensions are ignored.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #29  
Old 12-29-2010, 04:28 PM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Modifying a 4.4.1 skin questions...

So if I eliminate...

Quote:
{if $image_x ne 0} width="{$image_x}"{/if}
{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" />


It works great.

Sometimes the solution is so simple you go right over it.

Thank you Steve.
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
  #30  
Old 01-02-2011, 10:38 AM
 
artistwantab artistwantab is offline
 

eXpert
  
Join Date: Jul 2009
Posts: 320
 

Default Re: Modifying a 4.4.1 skin questions...

Ah Steve,

Now I know what you didn't comment on the above.

You assumed I would run into a problem because by eliminating the script I would be affecting situations in which the size was passed to other areas.

And I did. In the checkout area the images used are not the thumbnail images but the full size images and therefore are way over sized.

So what is you recommendation?

Do I write an if/else Statement that unless the customer is in the thumbnail area then size use the normal code?
__________________
X-Cart version 4.7.2
x-special Offers
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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 not 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 09:41 AM.

   

 
X-Cart forums © 2001-2020