Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    35
    Plugin Contributions
    0

    Default Single Sidebox for External File image problem

    I am using the single sidebox for external file contribution and I have got it working except the images don't show up since they are listed as having the url http://chscrapbooks.com/images/imagename.jpg instead of http://store.chscrapbooks.com/images/imagename.jpg. I checked the sidebox files I am using to see if I can edit the image url but it reads:
    Code:
    $content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $random_featured_product->fields['products_name'] . '</a><br />' . $featured_box_price;
    and I don't know how to edit that type of code to include http://store.chscrapbooks.com/ before the images/ part of the url. Can anyone help me?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Single Sidebox for External File image problem

    It builds the information based on your configure.php file settings for your URL ... ie: HTTP_SERVER
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: Single Sidebox for External File image problem

    Quote Originally Posted by DrByte View Post
    It builds the information based on your configure.php file settings for your URL ... ie: HTTP_SERVER

    This is what I have:

    define('HTTP_SERVER', 'http://store.chscrapbooks.com');

    but the images are still using the domain (chscrapbooks.com) of the page I use the external sidebox on.

  4. #4
    Join Date
    Apr 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: Single Sidebox for External File image problem

    The images that are not showing are on this page: http://chscrapbooks.com in the sidebar of the blog. I do not know why they are not showing. Can anyone help?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Single Sidebox for External File image problem

    Aha ... the links are generated properly using HTTP_SERVER settings, but the images are generated "relative" to the page you're on, and since your script is running inside the "store" folder (ie: /store/specials_sb.php ) it's only generating paths like "images/myimage.jpg" instead of "store/images/myimage.jpg"

    You'll likely have to play with your DIR_WS_IMAGES setting, which defaults to this:
    Code:
    define('DIR_WS_IMAGES', 'images/');
    Perhaps add to the top of your specials_sb.php file an override that says this:
    Code:
    define('DIR_WS_IMAGES', 'store/images/');
    Do similarly for your other *_sb.php scripts.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Sidebox include external file?
    By bizshop1 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 6 Apr 2009, 10:00 PM
  2. Problem with: Can I Use An Image For the Sidebox Header? Tutorial
    By mipavluk in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Oct 2008, 09:59 PM
  3. single sidebox for external file
    By delia in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 3 Jan 2008, 08:45 AM
  4. help with external link for image in header
    By wysiwygmn in forum General Questions
    Replies: 0
    Last Post: 7 Aug 2007, 11:17 PM
  5. Single Column without sidebox for product info
    By cafe99 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 25 Jan 2007, 08:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg