Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

I have a problem with content breaking. I have 2 stores, 1 using OSc/MS2 an older version of STS (some "coder" has hacked many things to pieces for whatever reason) and the other installed clean with OSC/RC2 and STS 4.5.8. Anywho...i initially tested my STS template under the old cart, and got most things to format and appear correctly. (some text css and such were needing to be tweaked etc but nothing to major so far as I can tell).

 

After I installed the clean RC2 and STS 4.5.8 on a separate dir and essentially copied over my template files to the includes/sts_templates/mytemplate, things got screwy. page formatting broke (yes i updated all links to files and css so that wasnt an issue). direct catagory links dont work anymore (custom catagory images linked using index.php_X_X.html format that was also used on the other site and worked) another issue was the content being displayed on the main index, and where that info is gather from (or what tag in what file tells it what to display) i have removed the /TEXT TO DISPLAY/ blah blah from the /includes/languages/english/index.php and now it shows "whats new" parsed output. i will track that down im sure. The MAJOR things that i dont get where they are broken is on the product_info.php.html content page that i created. It worked fine and is the same template file i used from the other site, as are the sts_template.html and the index.php_0.html. CSS for both are the same (well except for the paths of course,lol) The product info page on the ew site breaks the page and has the appearance of of the col_left and col_right flipping sides and a few other things being pushed around. Images used and the same as are the template files, so i can only assume there is a variable in one of the new STS scripts, that is affecting page output, but i cannot track it down. This is really holding me up. Yeah, i could just clean up what i can on the old site, but I want to use not only the updated OSC cart but also STS, along with other contributions that have a RC2+ req. For feature reasons and security reasons. Going cross-eyed looking at file comparisions. Any insight into possible content display breaking related to STS (or where i might look)

 

 

I will do whatever is needed to get this fixed so i can get back to designing and also make my customer happy :)

 

Thanks in advance for any info you can lend!

 

_MATT

 

Matt,

 

You have some incorrect methods even if they did work in the older STS. For one, you should not link to categories using index.php_X_X.html format as it will cause other issues in your shop (such as session ID loss, empty cart, etc.).

Proper link format:

Post# 2917: http://forums.oscommerce.com/index.php?sho...p;#entry1162574

 

You need to completely remove the older STS. STSv3 and below is not compatible with STSv4. This includes removing all STS defines in any of the configure.php files (this is most likely your biggest problem).

 

You need to convert all of your STS tags from your old templates to the new STSv4 format. STSv4 does not use "block" in the building of the tags as STSv3 and below did. STSv4 and above does not slow the site down like the older STSv3 and below scripts did. This is not difficult.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Does anybody ever take the time to see if the solution is already available in the STS Power Pack site? Why reinvent the wheel?

 

See link in my signature below as well as in the STS User Manual for the STS Add-on Site (STSv4 Power Pack).

 

I searched long and hard to find a way to put a quantity input textbox on the product info page and the STSv4 Power Pack didn't come up in any of my searches.

 

I'm going to check it out right now. Thanks for the heads up!

Share this post


Link to post
Share on other sites
Matt,

 

You have some incorrect methods even if they did work in the older STS. For one, you should not link to categories using index.php_X_X.html format as it will cause other issues in your shop (such as session ID loss, empty cart, etc.).

Proper link format:

Post# 2917: http://forums.oscommerce.com/index.php?sho...p;#entry1162574

 

You need to completely remove the older STS. STSv3 and below is not compatible with STSv4. This includes removing all STS defines in any of the configure.php files (this is most likely your biggest problem).

 

You need to convert all of your STS tags from your old templates to the new STSv4 format. STSv4 does not use "block" in the building of the tags as STSv3 and below did. STSv4 and above does not slow the site down like the older STSv3 and below scripts did. This is not difficult.

 

Thanks for the quick response. Yeah i was wondering if that method was not supported in the newer version of STS (links) thats for the link. I wasn't overwriting the old sts or using it at all on the newer install, the only thing i copied from the older install was my template files (gfx and layout things). The sites are completely separate installs. So i guess the only thing remaining is making sure the STS tags are up to date in the template, which doesn't have too many STS tags in it atm, so that will work out well.

 

once again thank you for the response and info. Will keep you posted.

 

 

_Matt

Share this post


Link to post
Share on other sites

For more than a week now I've been looking for information on how to customize the $content element on all the main category pages (Hardware, Software, DVD Movies) and sub-category pages (Action, Cartoons, Comedy, etc.). On the main category pages, I want to remove the "New products for..." and on the sub-category pages I want to rearrange how the products are listed.

 

I was hoping I would find instructions on how to do this in the same manner as how the $content element of the product pages are modified with the file product_info.php.html. My best guess is that those files, if they were to exist, would be category_info.php.html and subcategory_info.php.html. But, as far as I can tell, STS doesn't have that set up as is.

 

Please tell me I'm wrong. Chastise me for not looking in the right places. Berate me for posting something that's been resolved a thousand times before. Then please, please tell me where to find instructions on how to do this.

 

If I am not wrong, what solutions for me are there, if any, that do not require any PHP knowledge ('cuz I don't have any)?

 

Thank youuuuu!!!

Share this post


Link to post
Share on other sites

Hey Bill,

 

I need to create a "Product Template" (for the $content found on product pages) for specific products based on their manufacturer. Based on all the docs, you can do this based on category, but not manufacturer.

 

I need this, because I have specific vendors that offer dynamic content (images, descriptions, etc.) that I can pull from their server based on the product number that's been requested.

 

Is there an undocumented way of creating a product_info.php file based on manufacturer?

 

Thanks,

 

Boom

Share this post


Link to post
Share on other sites

how do i make a page for ALL categories, but keep the index page template different? do I have to name each one for each category? what will happen when the client adds her own category? - NM I GOT THIS ONE FROM THE STICKIE.

 

also, is there a list of ALL the placeholders. I need to show a product image and can't figure it out. don't want the popup.

Edited by ~Kira

☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆

Share this post


Link to post
Share on other sites

ok i see all the placeholders in the manual. thanks for that. they worked great.

 

what i'm trying to do now is to change the look of category pages. I need an outline around the product image(s) and I want to format the table somewhat and use different buy now buttons. I have uploaded an index.php.html file to my content folder, but nothing is changing.

 

i don't want to mess up when it pulls products from the categories, and the cat pages are working properly, with the index different, so that's good, but I can't seem to change the content for those pages.

 

I did manage to change the content for product pages with a minimum of effort, but the index page just won't budge. any ideas? thanks in advance! : )


☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆

Share this post


Link to post
Share on other sites
ok i see all the placeholders in the manual. thanks for that. they worked great.

 

what i'm trying to do now is to change the look of category pages. I need an outline around the product image(s) and I want to format the table somewhat and use different buy now buttons. I have uploaded an index.php.html file to my content folder, but nothing is changing.

 

The index.php.html file goes in the root of your template folder (ie. catalog/includes/sts_templates/*your template*/index.php.html) not in your content folder.

 

i don't want to mess up when it pulls products from the categories, and the cat pages are working properly, with the index different, so that's good, but I can't seem to change the content for those pages.

 

To create a custom template for your category pages, simply create a new index.php_XX.html file, with the "XX" being your category ID. You can find the ID in your URL when you visit that category. Keep that file in your template root just like your index.php.html file mentioned above.

 

I did manage to change the content for product pages with a minimum of effort, but the index page just won't budge. any ideas? thanks in advance! : )

 

If you're referring to your store's front page, you can keep that separate with a file called index.php_0.html (same directory as above)

 

Hope that helps some...

 

Boom

Share this post


Link to post
Share on other sites
The index.php.html file goes in the root of your template folder (ie. catalog/includes/sts_templates/*your template*/index.php.html) not in your content folder.

 

 

 

To create a custom template for your category pages, simply create a new index.php_XX.html file, with the "XX" being your category ID. You can find the ID in your URL when you visit that category. Keep that file in your template root just like your index.php.html file mentioned above.

 

 

 

If you're referring to your store's front page, you can keep that separate with a file called index.php_0.html (same directory as above)

 

Hope that helps some...

 

Boom

 

the index.php.html takes care of all my category pages so I don't need separate ones for those, assuming the client will add her own later on, that's taken care of.

 

the index_0.php.html page is my index page (home page) with no categories.

 

The product pages look great, as I've put in product_info.php.html file (using the example there) into the content folder.

 

Is there a way for me to control the category pages the same way I'm controlling the product_info pages - by inserting a file into the content folder or by any other means?

 

how do I change the $content of the index.php.html page - for the categories? I still want it to pull the content (for example, products in whichever category is clicked on), but I want to format that content.


☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆

Share this post


Link to post
Share on other sites
how do I change the $content of the index.php.html page - for the categories? I still want it to pull the content (for example, products in whichever category is clicked on), but I want to format that content.

 

I'm new to this as well, but I'll offer what I know. The only editing of that info I've been able to tackle would be the options in the admin under Configuration/Product Listings. You can choose what info shows up for each item, and in what order.

 

The only other change I made was to list my products in 4 columns instead of 3. Did that just the other day, but I'll have to look up where that was...

 

What exactly do you want to "format" in your product listings? Maybe I can help with that.

 

I use the category templates to add a category-specific banner to each one like this: (http://www.woodwerks.com/catalog/index.php?cPath=112) It's great for keywords.

 

Boom

Edited by Boom

Share this post


Link to post
Share on other sites
the index.php.html takes care of all my category pages so I don't need separate ones for those, assuming the client will add her own later on, that's taken care of.

 

the index_0.php.html page is my index page (home page) with no categories.

 

The product pages look great, as I've put in product_info.php.html file (using the example there) into the content folder.

 

Is there a way for me to control the category pages the same way I'm controlling the product_info pages - by inserting a file into the content folder or by any other means?

 

how do I change the $content of the index.php.html page - for the categories? I still want it to pull the content (for example, products in whichever category is clicked on), but I want to format that content.

 

 

You can add any "content" that you like within each category template in addition to or absence of the $content tag.

 

At this time, STS does not come with the ability to template the "content" portion of the category template pages. You would have to edit the actual script (somepage.php) itself.

 

If you know how to code PHP, you can add this category content template feature by following my steps in the following post #4325:

 

http://forums.oscommerce.com/index.php?sho...p;#entry1303553

 

You will find it is a lot easier simply modifying the script (the PHP page) itself. The $content tag pulls in data that is taken from the php script you are running (index.php for example).

 

For example, the $content for index.php is the piece of code you find in index.php, between the call of column_left...

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

and the call of column_right...

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

.

If you want to modify it, you have to modify the script itself (the code inbetween those to include statements).

 

Search the contribution sections for add-ons the modify the product listing, category descriptions, etc. It is easier for non-PHP coders to follow this method for making modifications to these pages rather than attempting to make a content template for the category pages.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hey Bill,

 

I need to create a "Product Template" (for the $content found on product pages) for specific products based on their manufacturer. Based on all the docs, you can do this based on category, but not manufacturer.

 

I need this, because I have specific vendors that offer dynamic content (images, descriptions, etc.) that I can pull from their server based on the product number that's been requested.

 

Is there an undocumented way of creating a product_info.php file based on manufacturer?

 

Thanks,

 

Boom

 

Boom,

 

Try this format: product_info.php_mfr_4.html

 

It may not work as I have thought of creating a product content template based on the manufacturer.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Boom,

 

Try this format: product_info.php_mfr_4.html

 

It may not work as I have thought of creating a product content template based on the manufacturer.

 

Unfortunately that didn't work. If you end up adding it in a later version, I'll be first in line to test it out. :) Until then, I'll just have to skip on the dynamic content my vendor is offering me, and go the old fashion route.

 

Thanks for the response.

 

Have a GREAT holiday weekend!

 

Boom

Share this post


Link to post
Share on other sites

Ive cleaned up and got everything working pretty good. Now i can get back to design work :) . I had a quick question though. After looking through as many pages as i could and even trying to refine a search.. can we have custom template pages for account, account creation , contact, etc?

 

if yes, is there a list of the palceholders need for said pages (or do we gather them from the oscommerce core pages and add them to the template layout in the appropriate areas)

 

Thanks again for the link clarification earlier.

 

 

thanks in advance for any info on this new question.

 

 

_Matt

Edited by d3vilm4n

Share this post


Link to post
Share on other sites

I have found the placeholder in the user_code for catmenu but it does not give me the information I am looking for. I would like to change the default text. The drop down box shows catalog as default. I would like to change this to category instead so it is clearer to the customers. Where can I find the default text for this to change it?

Pat

Share this post


Link to post
Share on other sites
I have found the placeholder in the user_code for catmenu but it does not give me the information I am looking for. I would like to change the default text. The drop down box shows catalog as default. I would like to change this to category instead so it is clearer to the customers. Where can I find the default text for this to change it?

Pat

 

 

includes/modules/sts_inc/sts_user_code.php:

 

Find:

 

	if ( (sizeof($category_tree_array) < 1) && ($exclude != '0') ) $category_tree_array[] = array('id' => '0', 'text' => "Catalog");

 

Change the 'text' value to anything you want such as:

 

	if ( (sizeof($category_tree_array) < 1) && ($exclude != '0') ) $category_tree_array[] = array('id' => '0', 'text' => "Category");


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Ive cleaned up and got everything working pretty good. Now i can get back to design work :) . I had a quick question though. After looking through as many pages as i could and even trying to refine a search.. can we have custom template pages for account, account creation , contact, etc?

 

if yes, is there a list of the palceholders need for said pages (or do we gather them from the oscommerce core pages and add them to the template layout in the appropriate areas)

 

Thanks again for the link clarification earlier.

 

 

thanks in advance for any info on this new question.

 

 

_Matt

 

Matt,

 

I suggest that you take a look at the following Newbie Tips:

 

Post #5160 in the STSv4 Support Thread:

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

 

Also, take a look at the docs folder that came with the STSv4.5.8 download as it helps explain the different STS modules and what each one does.

 

The above will explain how to make a template for the stock PHP pages within osCommerce.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Hi,

 

I have the latest Header Tags SEO V 3.1.4 and STS 4.5.8 everything is working perfectly except the logo text (alt text)!

It is working with STS disabled but when STS is enabled it reverts to the default store name alt text??

john


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

getting cDynamic Meta Tags to work with STS.

Hi,

I have STS 4.5.8 installed & have installed cDynamic Meta Tags 1.5.3 - it all seems to be working fine apart from in my main page.

 

In index.php - the title tag is showing the text from the first line of my Store Index Description.

 

In admin, I've got the following set up:

 

Store Description: The Most Comprehensive Festival Survival Kit on the Net!

 

Store Index Description: £19.99 - 29 practical Travel Size Essentials in a reusable drawstring rucksack or Build Your Own from our travel size product range.

 

When I view source, it shows:

 

<head>

<title>4kits.co.uk - £19.99 - 29 practical Travel Size Essentials in a reusable drawstring rucksack or</title>

 

<META NAME="Description" Content="4kits.co.uk £19.99 - 29 practical Travel Size Essentials in a reusable drawstring rucksack or Build Your Own from our travel size product range. - The Most Comprehensive Festival Survival Kit on the Net!">

 

The title tag is showing the first part of the description & the description is showing the dsecription again & then the title is attached onto the end of that.

 

Please help - I'm pulling my hair out

 

Thanks

Jason

Share this post


Link to post
Share on other sites

Hello again! (and thanks again for the kick in the right direction although i have hit a few walls but bounced off them nicely and kept moving forward :) )

 

anyways.... new and seemingly small issue: upon adding the $loginofflogo command to an area on both my sts_template.hmtl and index.php_0.html, in which case the graphic and link switch work fine...and on all other pages. ALL EXCEPT when you go to a product page (product_info.php.html (content template page). Then the command syntax shows in place of the gif image/s and of course the linking doesn't work. But once you leave that page it works again. I immediately thought it was something that was missing from the sts_product_info.php page (modules/sts) or the product_info.php (modules/sts_inc)? a variable that wasn't captured from the base index templates? Well before I get ahead of myself, I will wait for your insight and hopeful fix for this.

 

 

much appreciated!

 

_Matt

Share this post


Link to post
Share on other sites
Hello again! (and thanks again for the kick in the right direction although i have hit a few walls but bounced off them nicely and kept moving forward :) )

 

anyways.... new and seemingly small issue: upon adding the $loginofflogo command to an area on both my sts_template.hmtl and index.php_0.html, in which case the graphic and link switch work fine...and on all other pages. ALL EXCEPT when you go to a product page (product_info.php.html (content template page). Then the command syntax shows in place of the gif image/s and of course the linking doesn't work. But once you leave that page it works again. I immediately thought it was something that was missing from the sts_product_info.php page (modules/sts) or the product_info.php (modules/sts_inc)? a variable that wasn't captured from the base index templates? Well before I get ahead of myself, I will wait for your insight and hopeful fix for this.

 

 

much appreciated!

 

_Matt

 

 

You have to be sure to use the same end (stop) character for each variable in the template. For product templates, you are probably using a beginning $ and an ending $ such as $categorybox$ so be sure to do the same for your $loginofflogo$.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

I have starting to design the product_info.php, I want change the hole page, not only the conten area (because I will have a god SEO page). So I save the files in /includes/sts_templates/full/ insted.

But how can I get the addtocart button to work?

 

Sorry for my bad eng

Share this post


Link to post
Share on other sites

Everything goes well except one confused me for days, How could I simply get a column off/hide from the table(Buy Now

column for example) that $content generated, cause i don't need this functionality from a merely presentation site, from

which file and where I can modify the code, please help me!!

Share this post


Link to post
Share on other sites
You have to be sure to use the same end (stop) character for each variable in the template. For product templates, you are probably using a beginning $ and an ending $ such as $categorybox$ so be sure to do the same for your $loginofflogo$.

 

The $ tag is everywhere it is supposed to be, as is the <?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>, however the product_info page is still breaking the feature.

Share this post


Link to post
Share on other sites
You are referring to the STS Add-on from the Power Pack site.

 

Yes, if you want your template to look exactly as the screen shots, then you will need to upload everything that is inside of the catalog folder. The template folder is the only thing that is required but the other files are there for your convienence. For example, tranparent image files are included that hide the corners of the infoboxes to allow the infoboxes to blend into the template. The instructions give the details of the remaining extra files.

 

actually right now I'm just using STS 4.5.8 on rc2.2a

 

Is there a way to change out the buttons so they correspond to the template I'm using (and can be changed when you choose another template) OR do I just have to upload them to the regular images folder every time I need to change them?


☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×