Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Your probably right... i'm not too sure what to look for in my configure files so i'll just post them here and hopefully you can help me out.

 

Admin/includes/configure.php

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', 'https://www.outfitterwarehouse.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', 'https://www.outfitterwarehouse.com');
 define('HTTPS_CATALOG_SERVER', 'https://www.outfitterwarehouse.com');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
 define('DIR_WS_ADMIN', '/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
 define('DB_SERVER', '');
 define('DB_SERVER_USERNAME', 'mysql');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');
?>

 

 

includes/configure.php

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.outfitterwarehouse.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://www.outfitterwarehouse.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', '.outfitterwarehouse.com');
 define('HTTPS_COOKIE_DOMAIN', '.outfitterwarehouse.com');
 define('HTTP_COOKIE_PATH', '');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'
?>

 

Thanks for the help.

lewisqic

Link to comment
Share on other sites

includes/modules/sts_inc/sts_user_code.php is the place where you should create your new placeholders. This files also includes an example on how to create one.

 

- Rigadin

Link to comment
Share on other sites

I am having a problem. before we go any further, I feel I must warn you that I am completely new to this stuff. And now my problem. I first tried installing this on my store that I had uploaded yesterday. I copied all of the necessary files, and checked 2 and 3 times afterwards. But no Matter what I do the STS module would not even appear in my admin module list. so I took my osc files and change all the necessary files offline and did a clean install. everything installed fine. my STS module appears and I can install it, but even after I install and enable it nothing happens. the storefront looks the same as before. I hope someone can help me out here. Any thought and consideration is ezxtremely appreciated. thanks again.

Link to comment
Share on other sites

I am having a problem. before we go any further, I feel I must warn you that I am completely new to this stuff. And now my problem. I first tried installing this on my store that I had uploaded yesterday. I copied all of the necessary files, and checked 2 and 3 times afterwards. But no Matter what I do the STS module would not even appear in my admin module list. so I took my osc files and change all the necessary files offline and did a clean install. everything installed fine. my STS module appears and I can install it, but even after I install and enable it nothing happens. the storefront looks the same as before. I hope someone can help me out here. Any thought and consideration is ezxtremely appreciated. thanks again.

Hi everybody,

 

Version 4 is a major release of the excellent STS contribution that you can find here: http://www.oscommerce.com/community/contributions,1524,

 

I started a new thread to not mix with STS v2/v3 questions and because the v2/v3 thread has reached 147 pages! If you have problem with STS v2 or v3, please look here: http://www.oscommerce.com/forums/index.php?sho...541&st=2920

The main advantages of this release are:

 

- Less code and several improvements, so should be faster..

- All templates are in their own folder, selection of folder is made in admin. Folder choice can be overwritten from URL for testing purposes.

- Use of modules for code specific to some pages (product_info.php for example), parameters accessible from admin (like shipping, payment or order total modules).

- Write own module for checkout, create account or else: easy to share like payment modules.

- Switch STS on/off from admin. When off, you will see your store like it was before STS installation.

- Debug mode still available from URL, but with a code defined by admin => works like a password.

- If STS is off, using debug mode from URL will turn it on only for you. Useful for testing without disturbing visitors.

- Ready for product page caching. Not implemented yet, but doors are open.

- Possibility to avoid sorting a big array (speed optimization), by adding a special char at the end of the placeholders, for example "$languages" becomes "$languages#". (Can be different on each template).

- Installation is still very easy, modifications only at beginning and end of some files.

- Possibility to have a template for header/columns/footer like always + a template for the content area. Useful with product_info: main template comes from the category where the product is, while the content itself is defined according to the product_info template.

- All boxes are now also available separately, no need to show specials if you want to show tell a friend box, no need to show best sellers if you want to show product notifications.

- Boxes that should not appear on certain pages will have an empty tag => customer won't see the placeholder name (try, in v2.x, $banner without having banner or $languages in checkout process page, you'll see what I mean.

- Possibility to write php script in the templates, like in STS v3.

- Compatible with templates made for STS v2 or v3

- Compatible with templates made for STS PLUS (STS v4.1 is based on STS PLUS 4.0.7, only few small modifications).

STS v4.1 is based on STS PLUS v4.0.7. STS PLUS itself is based on STS v3 but with so many changes in the code that I released it as a separate contribution.

Now, after positive feedback from the community and the blessing from the original author, Brian (great contribution, thanks Brian!), the code is back to where it belongs: STS.

 

Changelog from STS PLUS v4.0.7:

 

- UPDATED class sts.php: renewed some parts of the code. Include template file from within the sts class instead of from a separate function, so the template can use $this-> to access methods and variables from the sts class. Added function add_debug ($text, $br=true) that add text to the $sts->template['debug'] with a line break by default, it helps when you want to debug your store.

- DELETED sts_column_right.php as its 1 line code can be put directly in column_left.php

- UPDATED sts_footer.php: no need to record the variable columnright2footer as it does not contain any usable information. sts_display_output is now called from here.

- UPDATED examples in sts_user_code.php.

- UPDATED sts_display_output.php: do not display the template variable 'template_html' in debug mode because it makes the page very long and it only represents the source code of the page => you can look at the source code instead.

- UPDATED module sts_product_info.php v1.0.5 to use templates for products in a specific categories. Template product_info_c32 for products in category ID32 and in sub-categories. Works also for content templates.

- UPDATED sts_column_left.php to not show the reviews infobox when on the product_reviews_info.php page. The infobox and the page are using same variable names and it put mess when the infobox is called before the content of the page. This is a simple workaround. If you want the infobox to display all the time, you have to change the variable names inside the infobox (or inside the script of the page). I have not tested without STS, but I'm pretty sure that the problem is same, if the reviews infobox is placed in the left column.

You can also have a look at the STS PLUS thread here: http://www.oscommerce.com/forums/index.php?showtopic=187122, as many problems you will face have been discussed there.

 

- Rigadin

Link to comment
Share on other sites

thanks for your contribution its realy great one :)

i played alot with look of my store and stylesheet.css

 

but ......

 

i want to know who can i change the color of text in log in section

coz text color is white and background is with too

 

error2.gif

 

please help

Link to comment
Share on other sites

I am having a problem. before we go any further, I feel I must warn you that I am completely new to this stuff. And now my problem. I first tried installing this on my store that I had uploaded yesterday. I copied all of the necessary files, and checked 2 and 3 times afterwards. But no Matter what I do the STS module would not even appear in my admin module list. so I took my osc files and change all the necessary files offline and did a clean install. everything installed fine. my STS module appears and I can install it, but even after I install and enable it nothing happens. the storefront looks the same as before. I hope someone can help me out here. Any thought and consideration is ezxtremely appreciated. thanks again.
Which STS version did you install?

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

i want to install this simple contribution : Add Shopping Cart Info to Your Header but it won't works with STS 4.3

 

on the contribution download page there are several download that works for STS (Latest were STS Pljus) but non for STS 4.3!

 

all i have to do is to pass the code below to sts_user_code.php BUT IT NOT WORKING FOR ME

 

here is the code:

 

Updated to work with STS PLUS

This is just a little usercode to allow you to use this contribution in your STS layout.
Add this to your includes/modules/sts_inc/sts_user_code.php file, before the ?> at the end of the file is fine.


$sts->start_capture();
$productno = $cart->count_contents();
$totalprice = $currencies->format($cart->show_total());

if ($productno > 1) {
echo ENTRY_HCART_CONTAINS;
echo " ";
echo $productno;
echo " ";
echo ENTRY_HCART_ITEMS;
echo " "; echo " ";
echo ENTRY_HCART_PRICE;
echo " ";
echo $totalprice;
} elseif ($productno == 0) {
echo ENTRY_HCART_EMPTY;
} else {
echo ENTRY_HCART_CONTAINS;
echo " ";
echo $productno;
echo " ";
echo ENTRY_HCART_ITEM;
echo " "; echo " ";
echo ENTRY_HCART_PRICE;
echo " ";
echo $totalprice;
}
$sts->stop_capture ('headcart');

Add this to your includes/languages/english.php file, before the ?> at the end of the file is fine.

define('ENTRY_HCART_EMPTY', 'Your cart is empty.');
define('ENTRY_HCART_CONTAINS', 'Your cart contains:');
define('ENTRY_HCART_ITEM', 'item.');
define('ENTRY_HCART_ITEMS', 'items.');
define('ENTRY_HCART_PRICE', 'Total price:');

Thats it! Now use $headcart anywhere you want in your STS template files.

 

please help

Link to comment
Share on other sites

thanks for your contribution its realy great one :)

i played alot with look of my store and stylesheet.css

 

but ......

 

i want to know who can i change the color of text in log in section

coz text color is white and background is with too

 

error2.gif

 

please help

 

The easiest way I know of is to open the page in a browser - view the source code - find the line you want to change and see what style is affecting it (should have a class=stylename tag near the text you want to change the color on). Then just go into your stylesheet, find the class and edit the color ;)

~Tracy
 

Link to comment
Share on other sites

One quick question,

 

My client's website has a few informational pages that don't require any php-scripting to work, and as such, don't need html templates (after all, they are already in html). But to just use html links causes them to lose the account, shopping cart, and checkout links at the top.

 

In order to keep the navigation bar, and any potential future $variables, how can I adjust the html page to use the STS system. I assume I have to turn the html page into a php file, or create a php file that refers to the html file which I'd then put into the template folder.

 

Am I on the right track here?

 

Thanks in advance,

Sam

Link to comment
Share on other sites

One quick question,

 

My client's website has a few informational pages that don't require any php-scripting to work, and as such, don't need html templates (after all, they are already in html). But to just use html links causes them to lose the account, shopping cart, and checkout links at the top.

 

In order to keep the navigation bar, and any potential future $variables, how can I adjust the html page to use the STS system. I assume I have to turn the html page into a php file, or create a php file that refers to the html file which I'd then put into the template folder.

 

Am I on the right track here?

 

Thanks in advance,

Sam

 

I just re-created ours using the template and then set up links to them in the boxes/information.php file (as they were information pages like About Us - Our Commitment - etc...). If I remember correctly I did have to setup their info in filenames.php as well :)

~Tracy
 

Link to comment
Share on other sites

I just re-created ours using the template and then set up links to them in the boxes/information.php file (as they were information pages like About Us - Our Commitment - etc...). If I remember correctly I did have to setup their info in filenames.php as well :)

 

 

TracyS,

 

Thanks for your quick reply. I'll have to poke around those files and see if I can figure it out.

Link to comment
Share on other sites

Okay, another unrelated (to my last post) quirk. I've seen it before, but haven't gotten around to posting about it.

 

When STS is enabled, adding products to the cart works fine, until I go to add a new product. The new product gets added, but osCommerce immediately forgets about the previous product addition.

 

The only other contribution which might fuss with STS here is the QTPro addition, which tracks stock. But when STS is disabled the shopping cart works as it should with QTPro.

 

Anyone seen this?

 

Incidentally, I am using the latest STS 4.3.3 with HTC.

 

Thanks again in advance,

Sam

Link to comment
Share on other sites

TracyS,

 

Thanks for your quick reply. I'll have to poke around those files and see if I can figure it out.

 

Check out the contributions that allow you to add pages too - the information in there should walk you through the majority of it ;) It was fairly simple since I was able to do it ;) It's just been a bit since I did, but I can look at my files if you have problems and let you see the code I have for comparison :)

~Tracy
 

Link to comment
Share on other sites

....such as?

 

TracyS,

forgive the tone of that last post... I was typing quickly & not thinking that it might read as being curt. The intended question was, which contribution would you or anyone else recommend for adding pages?

 

Sam

Link to comment
Share on other sites

TracyS,

forgive the tone of that last post... I was typing quickly & not thinking that it might read as being curt. The intended question was, which contribution would you or anyone else recommend for adding pages?

 

Sam

If you are looking for a particular contribution to do this for you I would suggest "Information Unlimited Pages".

 

Here is the link:http://www.oscommerce.com/community/contri...ation+unlimited

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

If you are looking for a particular contribution to do this for you I would suggest "Information Unlimited Pages".

 

Here is the link:http://www.oscommerce.com/community/contri...ation+unlimited

 

Super thanks bk, I'll check it out. Incidentally, any thoughts on my previous post...??

 

When STS is enabled, adding products to the cart works fine, until I go to add a new product. The new product gets added, but osCommerce immediately forgets about the previous product addition.

 

The only other contribution which might fuss with STS here is the QTPro addition, which tracks stock. But when STS is disabled the shopping cart works as it should with QTPro.

 

Anyone seen this?

 

Thanks for such quick responses all around. This place is great!

 

Sam

Link to comment
Share on other sites

Super thanks bk, I'll check it out. Incidentally, any thoughts on my previous post...??

 

 

 

Thanks for such quick responses all around. This place is great!

 

Sam

Sam, this appears to be a Session ID issue, possibly the two contributions colliding with each other somewhere. I do not use the tracking contribution so I really can't help you out but to suggest looking over the files of each contribution and see if there are conflicting modifications. If the other contrib. creates a box or returns some information back onto the page, then you will need to configure STS to display this information by creating a tag for it. STS on it's own does not corrupt Session IDs.

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

just a quick question:

 

in the STS 4.3 user guide noted:

 

4.3 Placeholder for main content
The main content of the page (middle of the page) is put in the $content tag, created in the file: “catalog/includes/modules/sts_inc/column_right.php”.

 

i look into the folder of sts_inc but

 

column_right.php nowhere to be found

 

have i miss read?

 

regards

michael

Link to comment
Share on other sites

just a quick question:

 

in the STS 4.3 user guide noted:

 

4.3 Placeholder for main content
The main content of the page (middle of the page) is put in the $content tag, created in the file: “catalog/includes/modules/sts_inc/column_right.php”.

 

i look into the folder of sts_inc but

 

column_right.php nowhere to be found

 

have i miss read?

 

regards

michael

Michael, that is a typo in the user manual for that version. In my updated User Manual for 4.3.3, Chapter 4.3 reads as follows:

 

The main content of the page (middle of the page) is put in the $content tag. The content is taken from the PHP script you are running. For example, the $content for index.php is the piece of code you find in index.php, between the call of column_left and the call of column_right. If you want to modify it, you have to modify the script itself. You can also use templates for the content part only. See example in chapter 3.9.2.

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

I accidentally posted this in the wrong area. Hence not title.

 

I have an existing xhtml/css web site that I would like to make my home page (index.php.html) then add a link to the catalog area (probably an image link since my shop sells art. But before I can do anything, I have to comprehend just how a html page can be modified using existing placeholders. I just cant see it! Ive looked and looked at includes/sts_templates/text/sts_blank_template.html and the example html provided. Id like to get away from using tables tags with all the old font stuff and just use div tags, p class tags, etc. for my layout and use the stylesheet for design.

I continue to look through the documentation and it sounds simple, yet I see no examples of how to insert the various variables (placeholders) or how they are utilized exactly.

My current page includes the tags: div id="wrapper", div id="header", div id="menu" (inline), div id="container", div id="content", 1 p class, 1 div class, and a div id="footer". Can I use these for at least my main index page? I can see that I could replace these with, for example $cataloglogo (for the header), $breadcrumbs (for the menu), $content (for content), and $footer for the footer. But I just dont see where on the page I would put them unless I remove the table tags junk. Are they implimented similar to <div id="footer">...</div>?

 

Anyway, I will keep studying and hope that someone is out there who can assist.

Link to comment
Share on other sites

TracyS,

forgive the tone of that last post... I was typing quickly & not thinking that it might read as being curt. The intended question was, which contribution would you or anyone else recommend for adding pages?

 

Sam

 

Don't worry - no offense taken. I agree with Bill - start with Information Unlimited Pages. I ended up learning how the extra pages were created by looking at one of the contributions - I just don't remember which one so I apologize - and then I just created them as I needed them. Sorry it took a little bit to get back with you - I was on vacation for most of the Holidays.

~Tracy
 

Link to comment
Share on other sites

I accidentally posted this in the wrong area. Hence not title.

 

I have an existing xhtml/css web site that I would like to make my home page (index.php.html) then add a link to the catalog area (probably an image link since my shop sells art. But before I can do anything, I have to comprehend just how a html page can be modified using existing placeholders. I just cant see it! Ive looked and looked at includes/sts_templates/text/sts_blank_template.html and the example html provided. Id like to get away from using tables tags with all the old font stuff and just use div tags, p class tags, etc. for my layout and use the stylesheet for design.

I continue to look through the documentation and it sounds simple, yet I see no examples of how to insert the various variables (placeholders) or how they are utilized exactly.

My current page includes the tags: div id="wrapper", div id="header", div id="menu" (inline), div id="container", div id="content", 1 p class, 1 div class, and a div id="footer". Can I use these for at least my main index page? I can see that I could replace these with, for example $cataloglogo (for the header), $breadcrumbs (for the menu), $content (for content), and $footer for the footer. But I just dont see where on the page I would put them unless I remove the table tags junk. Are they implimented similar to <div id="footer">...</div>?

 

Anyway, I will keep studying and hope that someone is out there who can assist.

 

I use layers and CSS as well. The $footer tag, for example, simply calls the information that needs to go into the footer from a specific php file. So - yes - you can create your template with layers and CSS. Then - if you see that your footer doesn't have the correct font color for example - you can view the source code and see what style osCommerce has setup in the stylesheet for the footer and then edit that part of your stylesheet accordingly. Many of the various aspects of your pages are governed by the stylesheet from osCommerce and I've found this to be the easiest way to see what styles need tweaking when the styles for the layer I have that item in don't seem to be correcting things :)

 

The one thing you will find with osCommerce is that the information boxes are put into tables. I have not yet figured out a way to re-write the includes/classes/boxes.php file to take the tables out and just have layers for the information boxes. But it doesn't really cause a problem as the table is created inside of whatever layer you put your STS placeholder into, so the positioning is still created through your stylesheet if you're positioning your layers via the stylesheet ;)

 

I hope that made sense - it's first thing Monday morning after a long Holiday weekend, so if that wasn't clear please let me know and I'll be happy to try again :blush:

~Tracy
 

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.

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...