Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

On this note - NONE of my modules show up as installed in Admin :blink:

 

The URL it shows is:

localhost/mmherbs/includes/modules/payment/ for example.

 

Any thoughts on this? :huh:

Tracy, on your local server, if your catalog folder *is* set at the document root, you will need to take out all instences of '/catalog/' and make it root '/'.

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

Also:

You need to edit two configure.php files. One in admin/includes/configure.php and the other in includes/configure.php.

Make sure that you do not have an extra configure.php in catalog/includes/local and none in catalog/admin/includes/local as configure.php files located in the local folders overide those in the includes folders.

 

Check the following lines in your configure.php files:

define('DIR_FS_DOCUMENT_ROOT', '/home/varn/public_html/yourdomain/catalog/'); // where the pages are located on the server

 

should be

define('DIR_FS_DOCUMENT_ROOT', '/home/varn/public_html/yourdomain/catalog'); // where the pages are located on the server

 

removal of slash from end of path

 

Also:

define('HTTP_COOKIE_DOMAIN', 'http://www.yourdomain.com');

 

should be

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');

Hope this helps you out,

Bill Kellum

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

Also:

You need to edit two configure.php files. One in admin/includes/configure.php and the other in includes/configure.php.

Make sure that you do not have an extra configure.php in catalog/includes/local and none in catalog/admin/includes/local as configure.php files located in the local folders overide those in the includes folders.

 

Check the following lines in your configure.php files:

define('DIR_FS_DOCUMENT_ROOT', '/home/varn/public_html/yourdomain/catalog/'); // where the pages are located on the server

 

should be

define('DIR_FS_DOCUMENT_ROOT', '/home/varn/public_html/yourdomain/catalog'); // where the pages are located on the server

 

removal of slash from end of path

 

Also:

define('HTTP_COOKIE_DOMAIN', 'http://www.yourdomain.com');

 

should be

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');

Hope this helps you out,

Bill Kellum

 

It should also be mentioned that the above is not a STS issue but rather a fix for an osCommerce installation problem regarding paths. :-

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

Not related to STS, just my 2 cents about moving a store to another location: copy all the files to the new location, replace catalog/install/oscommerce.sql by the latest backup of your database, run the normal install procedure. All path will be set automatically and database will be populated.

 

About STS now: I'll release soon v4.5 where known bugs have been corrected and where Dynamenu/CSS infoboxes are working with infobox templates.

 

- Rigadin2

Link to comment
Share on other sites

HOW TO ADD MANUFACTURER NAME and MANUFACTURER IMAGE in STS4

 

Also.. another quick question.. is there a tag for the content template to show the manufacturer name or logo? I thought there would have been but can't find it in the list in the documentation.

 

Thanks,

Natalie

 

edit :

catalog/includes/modules/sts_inc/product_info.php

 

add:

// MANUFACTURER in PRODUCT INFO START
$manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p  where p.products_id = '" . $products_id . "' and p.manufacturers_id = m.manufacturers_id");
$manufacturer = tep_db_fetch_array($manufacturer_query);

$template_pinfo['manufacturername'] = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id'] . '=' . $manufacturer['manufacturers_name'], 'NONSSL') . '">'. $manufacturer['manufacturers_name'] . ' </a>';
$template_pinfo['manufacturerimage'] = tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $manufacturer['manufacturers_name']);
// MANUFACTURER in PRODUCT INFO END

 

AFTER:

// Get product information from products_id parameter
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);

 

around line: 26

 

Then you can use on your product info template:

$manufacturername$

and

$manufacturerimage$

Spyros

Link to comment
Share on other sites

Well - I've got myself good and stuck now - LOL :blush:

 

I setup a local testing server. I copied all of the files from the live site into the new local test server and used a new backup of my live database to populate my local database.

 

When I go to my site on localhost though I have a problem. None of the category or product links work. I can view information pages (such as conditions of use) but not any product or category pages.

 

I went to admin to see if it had to do with STS (I do have Ultimate SEO URL's turned off in the local server) and when I go to Admin/Modules/STS it just has the button to Install. I click the Install button and it does nothing. The site is using the templates though?? Also, if I go to the Header Tags section in my Admin on my local site, and click on the Text Control, it is blank :blink: This is not the case on my live store.

 

Are there things I need to change in my STS v4.2 w/Header Tags Controller files in order for them to function properly on my localhost? I've been searching through the forums and I haven't yet found anything helpful but I will continue to search while awaiting a reply :blush:

 

I just saw this. I'm finding a lot of little bumps and squiggles with my local server. My semi-educated guess is that it has to do with files and paths. You could try setting up a couple of plain-vanilla HTML documents (not to be visible to visitors) on your production server in a couple of different directories, then linking from one to the other--then copy them to your test environment and see if those links still function properly. That would rule out all the additional factors in the OSC/STS environment. I had a LOT of trouble getting the STS templates to locate the images directory on the local host. Since I'm under a time crunch, and I have a production server I can work with, I just set up an unused domain on the production server and am doing all my STS work there--with the catalog directory passworded at the moment. Not everybody has that luxury, and if I didn't, I'd be looking at those paths.

 

Regards,

Anne

Link to comment
Share on other sites

Not related to STS, just my 2 cents about moving a store to another location: copy all the files to the new location, replace catalog/install/oscommerce.sql by the latest backup of your database, run the normal install procedure. All path will be set automatically and database will be populated.

 

About STS now: I'll release soon v4.5 where known bugs have been corrected and where Dynamenu/CSS infoboxes are working with infobox templates.

 

- Rigadin2

 

Bill and Rigadin - Thank you for your input! I followed Rigadin's advice and pasted the Install folder onto my localhost and ran that (minus the database) for the configuration files. I then compared them with the info from Bill to make sure they were correctly setup. That took care of the issue of not being able to see my modules :)

 

I then found a line in my httpd.conf file for the rewrite engine that was commented out, I uncommented that line and wallah! I have a working localhost now!! WOOHOO!!

 

Now I can test and implement new things before uploading them to the live site :thumbsup:

 

I will be testing the dynamic category names here shortly - that will save me several templates if it works (I currently have 72 templates - LOL).

 

Thanks again!

~Tracy
 

Link to comment
Share on other sites

Tracy,

Is this what you are looking for?

http://www.oscommerce.com/forums/index.php?s=&...t&p=1011814

 

The above link is to a post that I created regarding a dynamic page heading to replace the text "Let's See What We Have Here?" and "What's New" etc. with the name of the category and subcategory page.

 

Let me know if this helped,

 

Hi Bill,

 

Just putting the

<?php echo $category['categories_name'] ?>

into the template file where I want the category name to appear doesn't work. I also tried

<?php echo $category['cd.categories_name'] ?>

and still nothing. Any other ideas on how to dynamically place the category name in the template? :blush:

~Tracy
 

Link to comment
Share on other sites

I am having issues creating a custom template for a specific page.

The instructions in the documentation are not that detailed.

Could you please give me a run down

 

My understanding is to create a file in the /modules/sts/ folder

and to add a file in the sts_templates/test folder

 

But i cant seem to get it to work.

 

Shane

Link to comment
Share on other sites

Hi all,

 

I have installed the contribution, went to admin and installed it.

I clicked edit and on the question "Do you want to use Simple Template System?", I chose True.

BUT the option is not saved and remains to FALSE and I cannot use the STS.

 

Any help will be appreciated.

Thanks

Link to comment
Share on other sites

This question relates to the Knowledge Base "Tips and Tricks" entry regarding placing a shopping cart summary at the top of each page. That's located here:

 

http://oscommerce.info/kb/osCommerce/Gener...s_and_Tricks/56

 

A code snippet is provided, and you also need to define a class in your stylesheet. The code is placed in header.php.

 

I've tried doing this, and I can't get it to show up in the header. I know STS takes over a great deal of the header.php, and I'm wondering if there is some specific location in that file where the code should be placed. I've seen this implemented on sites that use STS, so I know it can be done.

 

Thanks,

Anne

Link to comment
Share on other sites

Hi Bill,

 

Just putting the

<?php echo $category['categories_name'] ?>

into the template file where I want the category name to appear doesn't work. I also tried

<?php echo $category['cd.categories_name'] ?>

and still nothing. Any other ideas on how to dynamically place the category name in the template? :blush:

Tracy, those edits are for the index.php file. They will not work by placing them in the STS template.

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 am having issues creating a custom template for a specific page.

The instructions in the documentation are not that detailed.

Could you please give me a run down

 

My understanding is to create a file in the /modules/sts/ folder

and to add a file in the sts_templates/test folder

 

But i cant seem to get it to work.

 

Shane

Shane, it is a lot easier than that.

STS template structure:

 

It is best to save your default template file as sts_template.html inside whatever template folder you are using (full, test, my_templates, etc.). Then, you would stipulate this in the STS “Default” module in the admin panel. The “sts_template.html” file would be used for all pages in your shop that you have not created a custom template for.

Now, to answer your question about custom templates for specific pages: First you need to understand how STS “searches” to see if a custom template is available. I have created a flow chart in the STS manual to show how this works. As an overview of the process, it works like this:

 

• If you wanted to create a template for Category 3, which is the “out of the box” osCommerce “Hardware” category, you would create a template and save it as “index.php_3.html”.

• Now if you wanted to create a template for a sub-category within a category you would do the following (using the example above):

 

Create a template and save it as “index.php_3_9.html” to be used as a template for the “out of the box” category “Hardware” and sub-category “Mice”. Now this template will be used each time a visitor opens up the “mice” sub-category (sub-category 9) in your store. Keep in mind that the template for Category “Hardware” (Category 1) is totally independent of the template you just created for sub-category 9 "Mice".I hope by now you are seeing the pattern that STS uses to find templates.

 

So when a visitor opens a page in your store, such as a product page for product ID 26, STS will first see if there is a “index.php_1_9_26” template. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be “index.php_1_9.html”. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be “index.php_1.html”. If there is such a template, STS will use it. If not, STS will end it’s search and use the “default” template, which unless you have changed the default settings would be “sts_template.html”.

 

I hope this has helped you in understanding how the templating structure works with STS.

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

Hi all,

 

I have installed the contribution, went to admin and installed it.

I clicked edit and on the question "Do you want to use Simple Template System?", I chose True.

BUT the option is not saved and remains to FALSE and I cannot use the STS.

 

Any help will be appreciated.

Thanks

In my signature below, select STSv4.4, then scroll down on that page until you find 060817 Module Fix by bkellum. Follow the instructions included in that download.

 

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

Tracy, those edits are for the index.php file. They will not work by placing them in the STS template.

 

Hmmm. Well - any thoughts on how I could put something into the template to pull the name of the current category? It does it dynamically (somehow) for the Products with the $content tag. But on the Category pages I need it to show up before the $content tag :blush:

 

Do you think it would require creating a start capture item, giving it a tag (like $catname or something) and using the query from that other post basically as an include through the start capture ? (I hope that made sense - LOL)

~Tracy
 

Link to comment
Share on other sites

Hmmm. Well - any thoughts on how I could put something into the template to pull the name of the current category? It does it dynamically (somehow) for the Products with the $content tag. But on the Category pages I need it to show up before the $content tag :blush:

 

Do you think it would require creating a start capture item, giving it a tag (like $catname or something) and using the query from that other post basically as an include through the start capture ? (I hope that made sense - LOL)

Tracy, if you make the edits above from my previous post, your template will automatically pull that from whatever category that it is displaying. For example, instead of seeing "Let's see what we have here", you might see "Hardware" or whatever the name of the particular category being pulled up. STS will use whatever template you have chosen (default, category, etc.) but will still display the dynamic heading unless you have wiped this out in your PHP code elsewhere. :-

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

Tracy, if you make the edits above from my previous post, your template will automatically pull that from whatever category that it is displaying. For example, instead of seeing "Let's see what we have here", you might see "Hardware" or whatever the name of the particular category being pulled up. STS will use whatever template you have chosen (default, category, etc.) but will still display the dynamic heading unless you have wiped this out in your PHP code elsewhere. :-

 

Well - I just realized that it really won't allow me to accomplish the point I was attempting to do it for anyway :blush:

 

I was thinking I could cut down on the number of templates by having the category dynamically generated - but, I have different content on each category and subcategory page as well. I need the category name to appear above the content I created on the templates, while the $content tag appears below that information. Initially, the category name was pulled through the $content tag - but that placed it below the content I had created on the template so I pulled it out of there in order to place the category name where I wanted it.

 

Apparently - if I want to lower the number of templates, I not only have to dynamically generate the Category name - but I would also have to dynamically pull the text for each individual page. So - I think we'll just have 72 templates for now - LOL

 

If you are totally lost on what I'm looking at - go to http://www.mountainmeadowherbs.com Click on Women's Health (for example). All of the images and text in the content area (under the breadcrumbs) that is above the listing of categories is put there manually on the template. I have the same images used for the Fertility, Menopause, Varicose Veins and Yeast subcategories of Women's Health. So I was thinking I could dynamically pull those subcategory names and have only one template for all of those pages. But each one of those pages has it's own unique text content.

 

So please correct me if I'm wrong and I've missed somewhere that I can enter the text information individually per category - but with my current knowledge it looks like I would have to create BOTH the ability to pull the category name AND the ability to have the text for each individual category pulled dynamically in order to utilize one template for more than one category or subcategory page :mellow: (I think :blush: )

~Tracy
 

Link to comment
Share on other sites

How i solve this problem?

 

Template file does not exist: [includes/sts_templates/test/boxes/infobox_header.php.html]Template file does not exist: [includes/sts_templates/test/boxes/infobox.php.html]

 

Thanks

KUBICO from Portugal

Link to comment
Share on other sites

How i solve this problem?

 

Template file does not exist: [includes/sts_templates/test/boxes/infobox_header.php.html]Template file does not exist: [includes/sts_templates/test/boxes/infobox.php.html]

 

Thanks

This could happen if you have selected "test" as your sts template folder in the STS Default Module, AND you do not have a folder called "boxes" inside that template folder, AND you do not have a file in the boxes folder called "infobox_header.php.html or infobox.php.html.

This can be corrected by simply changing your sts template folder to "full" or copying the "boxes" folder from "full" into your "test" folder.

 

Note: The "test" folder was meant to be used only after you initial sts installation to "test" that STS is actually working. If all is well, you should either use the "full" template folder or create your own once you understand how STS works and you want to take advantage of specific templates for pages, categories, products, infoboxes, etc.

 

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

OK. I have installed Oscommerce and STS 4 locally, using XAMPP as a test server. I've created an HTML file which is being used as the template, featuring a graphical banner at the top of the page with four graphical buttons to its left for navigation of 'my account', 'new products', 'contact us', and 'view cart,. Lower down on the left is the categories menu. Working in dreamweaver, I've linked each button to its respective PHP file, but its here that I think I am missing something.

When it came to testing the site, I noticed that navigating using the categories box held a session id to maintain items in the shopping cart, whereas navigating using my buttons seems to somehow loose the session id. I had a quick scout around on the knowledge base with reference to session id's, but all I came up with is code for use within a PHP file, which is seemingly no use for an HTML STS template. I've read that using the 'force cookies' option would help with my situation, but that it would be of no use as I am planning on using a shared SSL certificate.

What do I need to do to give my buttons the ability to carry the needed session id? And if I may run without being able to walk, what would I need to do in order to implement a flash menu in place of my created buttons?

 

Thanks in advance for any help.

 

p.s. If it turns out that I'm just being dense, I humbly promise to ascend a snowcapped mountain and lash myself senseless with a gnarled sappling -completely naked - and post the resulting footage on google video.

Link to comment
Share on other sites

So please correct me if I'm wrong and I've missed somewhere that I can enter the text information individually per category - but with my current knowledge it looks like I would have to create BOTH the ability to pull the category name AND the ability to have the text for each individual category pulled dynamically in order to utilize one template for more than one category or subcategory page :mellow: (I think :blush: )
Tracy, I may be wrong but...

In order to do what you are wanting above, you would first have to have the content already before it could be pulled dynamically.

So, for each category, you would need a category description that works much like the product description does on a stock osC.

STS allows you to do this easily by creating specific category templates to your hearts desire. However, as you have experienced, if you have a lot of categories, then you would need to create a lot of category templates to get this effect.

 

The only work around to this is:

  1. Create the category description (for each category)
  2. PHP hard coding to stock osC files to pull in the category descriptions
  3. Make it work so that it will be pulled into one STS category template dynamically with the $content tag

You can do the above yourself or take a look at one of the following contributions that should do all of the above for you:

http://www.oscommerce.com/community/contributions,4053

 

http://www.oscommerce.com/community/contributions,4294

 

http://www.oscommerce.com/community/contri...ons,4414/page,2

 

OK, I'll stop there just in case I am totally off on what you are wanting to do. :lol:

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

hi..

 

i just install STSv4.4..... and now i got this error

 

Fatal error: Call to a member function on a non-object in /home/***/public_html/catalog/includes/functions/html_output.php on line 130

 

i just fix the error on line 78 but now the page didnt display properly and show the above error at the bottom of the page.

 

another thing.. i got an few text on top of my page

// 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'); ?> // START STS 4.1 $sts->restart_capture ('applicationtop2header'); // END STS 4.1

 

how do i remove it?

 

Thanx in advance

Link to comment
Share on other sites

I'm working with the latest release of STS - and am having troubles integrating it with Additional Product Images (http://www.oscommerce.com/community/contributions,1032)

 

What I have found is that I can not call the product info in order to sort/display my images. When using the following:

(int)$HTTP_GET_VARS['products_id']

I get an output statement of "0". Which is creating all of the errors. Basically, the Additional Images mod - can't find it's images - because it thinks the product_id is zero.

 

Is there any work around for calling the products_id on demand?

Thanks!

Link to comment
Share on other sites

hi, hope someone can help

 

ive just installed the sts system (latest vers.) However, the site /catalog only shows the index page as a list and nothing else. http://www.pebble-designs.co.uk/catalog. Ive installed the module and set the template index to true.

 

i dont know what else to do! :'(

 

 

Fantastic ive installed it. Finally.

 

now the current issue is that the pop-up system now doesnt work. when you click on an image, its dead!! it doesnt pop up like it should!!!

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