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

YOU ARE HERE:
How to globally replace your shop images

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « How to globally replace your shop images »
Welcome, Guest. Please Login or Register.
12/16/17 at 09:13:04
Home Help Search Login Register
   marty.net message board
   About cpshop
   Tutorials
   How to globally replace your shop images
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: How to globally replace your shop images  (Read 1661 times)
Bradley W. Schenck
Gold Dragon
****

Posts: 242



Go Scots!
   

WWW
How to globally replace your shop images
« on: 10/07/06 at 15:01:22 »
Reply with quote Modify message


I've just gone through this process again and thought I'd document how it works; it's  a little more complicated lately.

I guess I went on and on, because the tutorial was too long to post here; so I've uploaded it to this prestigious location.
Logged
Bradley W. Schenck
Gold Dragon
****

Posts: 242



Go Scots!
   

WWW
Re: How to globally replace your shop images
« Reply #1 on: 10/10/06 at 06:53:21 »
Reply with quote Modify message

I've added several lines to the images file replacements; mostly these just corrrect error messages you'd see on your server logs, but they probably also slightly improve page load times.  (The alternate color images were still trying to load, even though their functions were disabled).

Also, I added a replacement that corrects a problem with a CP javascript file that was trying to load with a relative, rather than an absolute, address.  This probably affects any CPShop installation.  Chances are you'd only see that if you browsed your error logs.
« Last Edit: 10/10/06 at 07:06:03 by Bradley W. Schenck » Logged
Bradley W. Schenck
Gold Dragon
****

Posts: 242



Go Scots!
   

WWW
Re: How to globally replace your shop images
« Reply #2 on: 02/14/07 at 09:16:26 »
Reply with quote Modify message

Several new changes to the images served up by CP have continued to complicate this  system (which, probably, didn't really need to get more complicated).

We already had issues with the alternate color swatches, at the time I wrote this; but the following changes have now been implemented at CP:

1.  All images, including store thumbs and section images, are now stored on the same images server (they used to be on three separate servers, which made it easy to replace each one differently, or just one or two types of images).

2.  All images also now get version numbers in the middle of their filenames.  Because images may be crunched automatically at CP, the actual filename of an image may change at any time.

These two things together make it impossible to replace selected images.  

You see,you can strip out the version numbers to make your site immune to image re-crunching, but you must do that to every image that passes through your CPShop - you can't do it to some and not others.

And since the images are all coming from the same place you can't any longer isolate just store thumbs or just product images by checking where they're coming from.

Finally, since the product number is unique, and is also in the middle of the filename, it's also problematic to strip or replace parts of certain filenames.

There may be a clever way around this, but I haven't found it yet.

What I'm now doing at my Celtic/Retro site may be smarter than trying to be THAT smart, in fact.  What I'm trying now is to use two instances of CPShop at the site; one handles only clothing and does NO image replacement, while the other handles everything BUT clothing and replaces ALL store and product images.

Essentially, the second instance of CPShop works exactly like I describe in the tutorial, and it works just great for everything but clothing.  Because the first instance of CPShop is doing no image replacements it works just great with the new color-changing swatches on clothing, at the risk of worse performance as it loads images from CP.

Unfortunately I can't any longer do some of the changes I like to do on clothing store and product images.  But I guess in the big picture, those new swatch features are worth more to my visitors than my obsessive image manipulations .

Anyway I'm trying this system out, but I haven't made any changes in the tutorial to reflect that yet.  Film at eleven.
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.