Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newbie Here, using STS template w/ Dreamweaver - broken images


Aprilrobin

Recommended Posts

Sorry if this has been covered already, perhaps I am searching on the wrong terms.

 

This is my first time using OScommerce and I am not incredibly familar with PHP so I am using the STS template. I believe I have it installed correctly. I can change most things, colors, background etc. The one main problem I am having is with images. Even though I have them in my images folder and they show up when I instert them in dreamever, they appear broken when I view my store. I can't for the life of me figure out what my problem is. Anybody have any idea what I may be doing wrong? Specifically I am working on the header.

 

thank you!

Link to comment
Share on other sites

Sorry if this has been covered already, perhaps I am searching on the wrong terms.

 

This is my first time using OScommerce and I am not incredibly familar with PHP so I am using the STS template. I believe I have it installed correctly. I can change most things, colors, background etc. The one main problem I am having is with images. Even though I have them in my images folder and they show up when I instert them in dreamever, they appear broken when I view my store. I can't for the life of me figure out what my problem is. Anybody have any idea what I may be doing wrong? Specifically I am working on the header.

 

thank you!

 

 

1. check the image paths, dreamweaver might have added local image pats. ie. paths to image located on your local pc.

Link to comment
Share on other sites

Sorry if this has been covered already, perhaps I am searching on the wrong terms.

 

This is my first time using OScommerce and I am not incredibly familar with PHP so I am using the STS template. I believe I have it installed correctly. I can change most things, colors, background etc. The one main problem I am having is with images. Even though I have them in my images folder and they show up when I instert them in dreamever, they appear broken when I view my store. I can't for the life of me figure out what my problem is. Anybody have any idea what I may be doing wrong? Specifically I am working on the header.

 

thank you!

April, with your site open in a browser, Right Click (if using Windows) and then click on Properties. This will give you the path where your template is looking for the image. Check to see that either the path is correct or that the image is actually in the correct location.

 

Also: If you are using STSv4.4, A bug fix for the default image folder has been mentioned in the STSv4 Forum (see link in my signature).

 

I'll post them here for your benefit but you should post your questions in the STSv4 Forum in the future (to get a faster response as well as allowing the answer to benefit other STS users):

 

Bug fix 1 of 2 can be found at: http://www.oscommerce.com/forums/index.php?s=&...t&p=1023674

 

At the very end of application_top.php, it should look like this (order is important):

 

 

// START STS 4.4
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS 4.4
// initialize the message stack for output messages
 require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

// set which precautions should be checked
 define('WARN_INSTALL_EXISTENCE', 'true');
 define('WARN_CONFIG_WRITEABLE', 'true');
 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
 define('WARN_SESSION_AUTO_START', 'true');
 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');
?>

 

Bug fix 2 of 2 can be found at: http://www.oscommerce.com/forums/index.php?s=&...t&p=1037770

 

Templates are not being recognized by STS.

 

Open the includes/modules/sts/sts_default.php file.

Find:

 

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart")) {
return ''; // We don't use template for these scripts

$check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html";

if (file_exists($check_file)) return $check_file;

 }

 

Replace with (you will remove the bracket):

 

 

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

$check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html";

if (file_exists($check_file)) return $check_file;

If you leave the brackets "as is", then you will experience templates not being recognized by STS.

 

Hope this helped,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Thank you all for your help. I am surely going to try your fixes right now. I'm not exactly sure why this is working but I fiddled around and made an imaged folder within my templates folder. I am using this as my image source and as long as I also have the image in my main images folder it seems to work!

However, this is a bit rigged I imagine.

 

 

April

Link to comment
Share on other sites

April, with your site open in a browser, Right Click (if using Windows) and then click on Properties. This will give you the path where your template is looking for the image. Check to see that either the path is correct or that the image is actually in the correct location.

 

Also: If you are using STSv4.4, A bug fix for the default image folder has been mentioned in the STSv4 Forum (see link in my signature).

 

I'll post them here for your benefit but you should post your questions in the STSv4 Forum in the future (to get a faster response as well as allowing the answer to benefit other STS users):

 

Bug fix 1 of 2 can be found at: http://www.oscommerce.com/forums/index.php?s=&...t&p=1023674

 

At the very end of application_top.php, it should look like this (order is important):

 

 

// START STS 4.4
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS 4.4
// initialize the message stack for output messages
 require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

// set which precautions should be checked
 define('WARN_INSTALL_EXISTENCE', 'true');
 define('WARN_CONFIG_WRITEABLE', 'true');
 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
 define('WARN_SESSION_AUTO_START', 'true');
 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');
?>

 

Bug fix 2 of 2 can be found at: http://www.oscommerce.com/forums/index.php?s=&...t&p=1037770

 

Templates are not being recognized by STS.

 

Open the includes/modules/sts/sts_default.php file.

Find:

 

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart")) {
return ''; // We don't use template for these scripts

$check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html";

if (file_exists($check_file)) return $check_file;

 }

 

Replace with (you will remove the bracket):

 

 

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

$check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html";

if (file_exists($check_file)) return $check_file;

If you leave the brackets "as is", then you will experience templates not being recognized by STS.

 

Hope this helped,

 

Bill, wow, I changed both of these bits of code. I think i must have a majorly missed up install here. No clue how I did that. I read the end bit of the application_top.php and it made no mention of version 4.4 , I somehow had 4.1??

I also changed the second bit of code.

I still seem to neew the images in the template directory and my cataglog/images directory but it's working for now so, wow. maybe i should just start all over.

Again though, thanks for your help. I would have been pulling my hair out trying to figure this out but at least now I know!

Edited by Aprilrobin
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...