Search:
 
PHP Site Solutions  ::  Board index  ::  PHP Site Solutions  ::  Open-source Software  ::  Dynamic Images
Forum Navigation Forum Navigation




The Dynamic Images module from PHP Site Solutions, is an open-source (and free) addition to the X-Cart ecommerce system. This module gives your X-Cart store the ability to dynamically resize images (and generate thumbnails) on the fly! You no longer have to worry about large product images driving customers away due to slow page loads. With our dynamic image generator, your product thumbnails will properly be resized & the new image is cached, to improve performance both on your server and for your customer.



Post new topic Reply to topic  [ 4 posts ] 
  Print view

How-to: Dynamic Images mod plus Lytebox image viewer
Author Message
PostPosted: Sat Aug 23, 2008 1:33 am 
Site Admin
User avatar
Offline

Joined: Thu Apr 24, 2008 5:29 am
Posts: 16
Location: NC, USA
As seen on this product page:
http://www.phpsitesolutions.com/x-cart- ... odule.html

Combining the Dynamic Images mod with Lytebox, can provide nice results for pages that have a product thumbnail & detailed product images.

These instructions assume that you have already properly installed Dynamic Images

Lytebox is a nice 'lightbox' style mod. Alternatives include: Thickbox, Shadowbox, Lightbox, etc.
Lytebox is licensed under a Creative Commons Attribution 3.0 License.

Instructions:
1a. Download the attached Lytebox archive, which has already been modified for X-Cart (Lytebox v3.22)
Attachment:
File comment: Lytebox v3.22 modified for X-cart.
Extract, upload files from /upload/ to the root of your X-Cart website.

x-cart_lytebox_3.22.zip [40.66 KiB]
Downloaded 88 times


1b. Open /skin1/customer/home.tpl
Find:
Code:
</head>


Replace with:
Code:
{* Lytebox *}
<script type="text/javascript" language="javascript" src="{$SkinDir}/js/lytebox.js"></script>
<link rel="stylesheet" href="{$SkinDir}/css/lytebox.css" type="text/css" media="screen" />
{* /Lytebox *}
</head>


2. Open /skin1/customer/main/product.tpl
Find: (code has been abbreviated where needed)
Code:
{elseif $product.force_image_type eq 'W' && $product.variantid}
{* PHP Site Solutions - Dynamic Images *}
{include file="product_thumbnail.tpl" ...} &nbsp;
{* / PHP Site Solutions - Dynamic Images *}
{else}
{* PHP Site Solutions - Dynamic Images *}
{include file="product_thumbnail.tpl" ...} &nbsp;
{* / PHP Site Solutions - Dynamic Images *}
{/if}


Replace with:
Code:
{else}
{* PHP Site Solutions - Dynamic Images *}
<a href="{$product.tmbn_url}" title="{$product.product|escape}" rel="lytebox[detailed]"><img src="{thumb file=$product.tmbn_url width=$phpss_dyn_img_width|default:$product.image_x link=false hint=false get_image_path=true}" id="product_thumbnail" class="thumb" alt="{$product.product|escape}" /></a>
&nbsp;
{* / PHP Site Solutions - Dynamic Images *}
{/if}


3. Open /skin1/modules/Detailed_Product_Images/product_images.tpl
Find:
Code:
<img src="{$images[image].tmbn_url}" alt="{$images[image].alt|escape}" style="padding-bottom: 10px;" />


Replace with:
Code:
   {* PHP Site Solutions - Dynamic Images *}
   {if $active_modules.PHPSS_Dynamic_Images ne ""}
      <a href="{$images[image].tmbn_url}" title="{$images[image].alt|escape}" rel="lytebox[detailed]"><img src="{thumb file=$images[image].tmbn_url width=50 link=false hint=false get_image_path=true}" class="thumb" alt="{$images[image].alt|escape}" /></a>
   {else}
<img src="{$images[image].tmbn_url}" alt="{$images[image].alt|escape}" style="padding-bottom: 10px;" />
   {/if}
   {* / PHP Site Solutions - Dynamic Images *}


***Please note: the above code will generate Detailed Product Images with a hard-coded width of 50px, you can change this value to whatever you want. Look for "width=50", change to whatever value you need.

And voila! You should now have a product page where your detailed images are being resized, and each image is clickable for a slick pop-up. Additionally, the images are grouped, so in the pop-up, you can click on Next/Prev to see other full-size images!

Cheers

_________________
-Jon Langevin

XCSEO Pro :: New version released, supports Page Title, Meta Keywords, Meta Description, Manual URLs, and more, for only $119.99!!

XCSEO Advanced :: New product released, focused solely on rewriting URLs, for only $79.99!!


Top
 Profile  
 

Re: How-to: Dynamic Images mod plus Lytebox image viewer
PostPosted: Fri Sep 19, 2008 2:22 pm 
User avatar
Offline

Joined: Fri Sep 19, 2008 1:35 pm
Posts: 2
I have installed the dynamic images portion of this mod on x cart 4.1.11/9/8 and it works fine, but everytime I try to take it a step further with the lytebox mod, my pages just time out. Any help would be greatly appreciated.


Top
 Profile  
 

Re: How-to: Dynamic Images mod plus Lytebox image viewer
PostPosted: Fri Oct 03, 2008 5:41 pm 
User avatar
Offline

Joined: Fri Sep 19, 2008 1:35 pm
Posts: 2
Anything On the above issue????


Top
 Profile  
 

Re: How-to: Dynamic Images help please
PostPosted: Sun Dec 21, 2008 1:02 am 
User avatar
Offline

Joined: Sun Dec 21, 2008 12:45 am
Posts: 2
Hi Coppercup,

Could you please help me. I am trying to install the dynamic image to my xcart 4.1.5 but when I applied the patch I had this error please see below:

Applying patch


Step 2 of 2: Applying the patch

Files patch status:
File Status
skin1/customer/main/product.tpl could not patch
skin1/product_thumbnail.tpl could not patch


Status legend:
OK - file ready to patch,
checksum error - patch contents is corrupted,
non-writable - please give those files a write permissions,
not a file - the target is not a file,
not exists - file is missing,
could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually,
already patched - file was already patched.

Files excluded from patch procedure:
File Status
image.php already patched


Status legend:
OK - file ready to patch,
checksum error - patch contents is corrupted,
non-writable - please give those files a write permissions,
not a file - the target is not a file,
not exists - file is missing,
could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually,
already patched - file was already patched.

PATCH RESULTS

PATCH FAILED AT FILE: skin1/customer/main/product.tpl, see PATCH LOG for details.
PATCH FAILED AT FILE: skin1/product_thumbnail.tpl, see PATCH LOG for details.

PATCH LOG

Patching file /home/fletcher/public_html/propertyrescueservices.co.uk/testtesttest/skin1/customer/main/product.tpl ...
Hunk #1 failed at 13.
1 out of 1 hunks ignored--saving rejects to /home/fletcher/public_html/propertyrescueservices.co.uk/testtesttest/var/upgrade/skin1^customer^main^product.tpl.rej
done
Patching file /home/fletcher/public_html/propertyrescueservices.co.uk/testtesttest/skin1/product_thumbnail.tpl ...
Hunk #1 failed at 1.
1 out of 1 hunks ignored--saving rejects to /home/fletcher/public_html/propertyrescueservices.co.uk/testtesttest/var/upgrade/skin1^product_thumbnail.tpl.rej
done


Warning!
The following files could not be patched with automated upgrade system. This may be because these files were changed from their original state. Those files needs to be patched manually or restored from backup.

File Status
skin1/customer/main/product.tpl could not patch
skin1/product_thumbnail.tpl could not patch


Status legend:
OK - file ready to patch,
checksum error - patch contents is corrupted,
non-writable - please give those files a write permissions,
not a file - the target is not a file,
not exists - file is missing,
could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually,
already patched - file was already patched.

Please correct the errors displayed above and try again.





Could please let me know what is it that I am doing wrong and how can I fix this issue.

Does the dynamic image works like this site www.monstertamplate.com if you point on any template thats how I want it to work.... Could you please help I have spent all day and I couldn't fix the issue... I can see the module in the module section but the patch want install at for:

PATCH FAILED AT FILE: skin1/customer/main/product.tpl, see PATCH LOG for details.
PATCH FAILED AT FILE: skin1/product_thumbnail.tpl, see PATCH LOG for details.

dynamic image file attached

Many Thanks


Attachments:
File comment: dynamic image file attached
dynamic_images_CURRENT.zip [13.83 KiB]
Downloaded 3 times
Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Authentication Authentication


Copyright © 2006-2008 PHP Site Solutions