marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Replacing the "Larger images"

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Replacing the "Larger images" »
Welcome, Guest. Please Login or Register.
12/11/17 at 15:14:34
Home Help Search Login Register
   marty.net message board
   General
   General Stuff
   Replacing the "Larger images"
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Replacing the "Larger images"  (Read 844 times)
Xeon
Guest

E-Mail
Replacing the "Larger images"
« on: 04/08/04 at 20:39:50 »
Reply with quote Modify message

Hi Marty! In your tutorial that teaches us how to replace images in our CafePress stores, there appears to be a problem, though.

On any specific product page, there's a "View larger images" link, whereby if you click it, the larger images will be shown.

But these larger images doesn't have a web address/location!
All of them are named as "http://www.cafeshops.com/cp/img/spacer.gif"

From the code, it seems that these larger images are dynamically calculate and generated on the fly and are just "virtual images" that doesn't exist?

Or is there a way to get hold of them and replace these large images as well?

Thanks Marty!
Xeon.
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Replacing the
« Reply #1 on: 04/09/04 at 00:43:38 »
Reply with quote Modify message

Sigh.

Each zoom image has a code number, and that code number is used in the javascript function that displays the image.

It usually looks something like this:

Code:
<script language="Javascript">e(4244923, 400, 320, 0, false);</script>

So there are two ways to replace that image.  One is to swap each zoom image with a particular piece of text:

Code:
*||||<script language="Javascript">e\(4244923||||<img src="/images/custom_4244923.gif"><script language="javascript">//e\(4244923
The other way is to replace all zoom images with the same image:

Code:
*||||<script language="Javascript">e\(||||<img src="/images/custom_image.gif"><script language="javascript">//e\(
« Last Edit: 04/09/04 at 09:47:49 by Marty » Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Xeon
Guest

E-Mail
Re: Replacing the "Larger images"
« Reply #2 on: 04/09/04 at 07:55:38 »
Reply with quote Modify message

Thanks Marty!

I coded the following code and put them in the cpshop.cgi.images file and uploaded it, but got an internal server 500 error when I view that particular store.

Deleted those code and everything works again.

The code is as follows :
Code:
s_mystoreID||||<script language="Javascript">e(||||<img src="/ImageReplaceFolder/1.jpg"><script language="javascript">//e(


Is the syntax wrong or is there any mistakes I made?

Thanks,
Xeon!
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Replacing the "Larger images"
« Reply #3 on: 04/09/04 at 09:46:51 »
Reply with quote Modify message

Sorry -- I should have escaped the open parenthesis (by placing backslashes in front of it).  I've also made the change to the code above, in case anyone else copies it later.


Code:
s_mystoreID||||<script language="Javascript">e\(||||<img src="/ImageReplaceFolder/1.jpg"><script language="javascript">//e\(
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Xeon
Guest

E-Mail
Re: Replacing the "Larger images"
« Reply #4 on: 04/10/04 at 03:21:32 »
Reply with quote Modify message

Thanks a lot again, Marty! It works like a total wonder!

PROBLEM SOLVED.
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright © 2000-2001, X-Null. All Rights Reserved.