Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Okay, got the custom boxes to work but I still can't get the currencies box to display on the product info pages.
Compare your product_info templates with your working templates to see what you may have done differently to cause the boxes not to show up.

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

Thank you Bill. I've got the currencies box showing on my product info pages now. I added this code:

$sts_block_name = 'currenciesbox';

require(STS_START_CAPTURE);

require(DIR_WS_BOXES . 'currencies.php');

require(STS_STOP_CAPTURE);

$template['currenciesbox'] = strip_unwanted_tags($sts_block['currenciesbox'], 'currenciesbox');

 

to sts_user_code.php

 

Not sure if I accidentally deleted it or if something else went wrong but (importantly) it works now!


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

I am trying to remove the customer account creation requirement. So I downloaded Purchase Without Account contribution. I can't integrate this with STS, because it uses a totally different system of templates. Has anyone attempted this before?

Share this post


Link to post
Share on other sites
I am trying to remove the customer account creation requirement. So I downloaded Purchase Without Account contribution. I can't integrate this with STS, because it uses a totally different system of templates. Has anyone attempted this before?
Try this:

 

Check your application_top.php file. You should have the following code at the end of the file:

 

// PWA BOF
 if (tep_session_is_registered('customer_id') && $customer_id == 0 && substr(basename($PHP_SELF),0,7)=='account') tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
// PWA EOF
 // START STS
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS
?>

 

 

 

Also, check your column_right.php file. It should have the following code at the beginning of your file:

 

 

// START STS
if ($sts->display_template_output) {
 $sts->restart_capture ('content');
} else {
//END STS
 require(DIR_WS_BOXES . 'shopping_cart.php');

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

// PWA EOF
 if (tep_session_is_registered('customer_id') && $customer_id > 0 ) include(DIR_WS_BOXES . 'order_history.php');
// PWA BOF

 

 

 

And at the end of this same file you should have this code:

 

// START STS
}
// END STS
?>

 

STS and PWA make modifications to the above same files so you needed to merge the differences to make them work.


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

Purchase without account:

 

You may also need the following code in your includes/classes/order.php file at the bottom before the last ?> (check your other order.php files in your shop as well):

<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->


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
You can't change the box layout with STS. You'd have to change the stylesheet and/or the PHP script that creates the boxes depending on what you want to change.

 

- Brian

 

 

I want to move the Search submit button next to (right) the search box so they are inline togeather.

 

I'm lost! :blush:

Share this post


Link to post
Share on other sites
I am hoping this is the correct thread to post this question, now that STS/HTC are a unified package. If not, would somebody be good enough to let me know?

 

I'm currently setting up a shop for a bookseller called St. Bede's Books. Naturally they want that to go in their header tag.

 

When setting up their tags, all works well, except that the page reads ST. BEDE\\\'S BOOKS. It doesn't matter if I just use the apostrophe or if I use the \ character in front of it--the result is always the same. Is there a way around this? Or could I use the alternate character?

 

Thanks!

Anne

 

It's not pretty in the form field but should look fine in HTML, use this (remove the space after the ampersign and before the semi-colon):

ST. BEDE& #39 ;S BOOKS

Edited by bustin98

Share this post


Link to post
Share on other sites
It's not pretty in the form field but should look fine in HTML, use this (remove the space after the ampersign and before the semi-colon):

ST. BEDE& #39 ;S BOOKS

 

Thanks! I will give it a try. Much appreciated.

 

Anne

Share this post


Link to post
Share on other sites

I continue to be delighted with the new version of STS. It's making life a lot easier. I installed it at my own shop today and have been cleaning up a lot of issues with how the shop looks. I have a question:

 

I want to change the appearance of the product listing pages, as well as the individual product info pages. For example, a listing of subcategories under a category, or the listing of products in a category or subcategory with their link (to the products), price, "buy now" button, etc. This has always been one of my least favorite parts of OSC; these pages sprawl all over the place. I use the very fine product_listing_columns contribution, and that helps some, but it's still not what I'm after.

 

Having mastered the art of the content vs framework pages for the product info, I keep thinking it should not be too hard to do this. How would one set it up? Are there placeholders I'm missing for this? If I wanted to set this up on my own (which I really don't, not so close to the beginning of holiday shopping) where would I look?

 

I am not a php scripting genius, but I am trainable (or educable)...

 

Thanks,

Anne

Share this post


Link to post
Share on other sites

Anne,

 

There is no placeholders for the product listing. Would be nice to have a template for the listing, at the product level, where price/name/buttons placeholders could be placed. The best place to start is the product_listing.php that comes with the product in columns contribution. The code would be something like this:

 

- Read template

- Product query

- For each product to display:

- Create placeholders variables

- Replace placeholders in the template

- Write the result in the array

END for each

- The array is written (using the boxes class)

 

Note: the array stuff is already used in the product_listing.php

 

 

I know it's not a fully functional example, but it's a start.

 

- Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites
Anne,

 

There is no placeholders for the product listing. Would be nice to have a template for the listing, at the product level, where price/name/buttons placeholders could be placed. The best place to start is the product_listing.php that comes with the product in columns contribution. The code would be something like this:

 

- Read template

- Product query

- For each product to display:

- Create placeholders variables

- Replace placeholders in the template

- Write the result in the array

END for each

- The array is written (using the boxes class)

 

Note: the array stuff is already used in the product_listing.php

I know it's not a fully functional example, but it's a start.

 

- Rigadin

 

Yes, and a good start, too. I think what I need to do is to put this "on hold" until after Christmas next month. Atelier-Beads does a huge amount of business between this week and about 22 December, and I'll be doing nothing but packing and shipping. At least I HOPE to be doing nothing but packing and shipping. :) It'll be a good project for those January doldrums, especially if I can post questions here. I have an acceptable looking page by virtue of the stylesheet, so that will hold me for the present.

 

Thanks,

Anne

Share this post


Link to post
Share on other sites

I am using STS4 and have "Default" and "Product info" set to true in the admin section module... "Index" and "Infobox template" set to false.

 

The homepage displays properly and so does the product page.... but when I try to display some other pages like for example: shopping_cart.php the main content expands and the header moves from its position too.

Isn't it supposed to be using the default template? I have a fixed width for the main content column.

How can I prevent this from happening?

Thanks!

Share this post


Link to post
Share on other sites
There are a couple different ways.

 

Probably the best way is to make your catalog directory the same as your web's home page and have your web hosting provider enable (if they don't have it already) index.php as a valid default filename.

 

This will cause your home page to be your catalog page.

 

You can also do the index.php trick above to redirect to your catalog page, but this will hurt your search rankings (if that's an issue) because there will be no text or links to navigate and index on your home page, only the redirection.

 

You can do a similar trick with and index.html and a redirect option (which I don't remember the syntax for off the top of my head).

 

- Brian

 

Now the search engines can follow redirection. Its an old concept that SE cant follow redirection.

 

SEO consultant & freelance SEO expert

Share this post


Link to post
Share on other sites
How can I prevent this from happening?

 

Well I ended making a shopping_cart page with a different width... not exactly what I wanted because I still can't control the appearance of the content in the shopping cart page, but it works more or less doing a trick with the width of the columns.

Share this post


Link to post
Share on other sites
Well I ended making a shopping_cart page with a different width... not exactly what I wanted because I still can't control the appearance of the content in the shopping cart page, but it works more or less doing a trick with the width of the columns.

 

 

Read in the OScommerce Knowledge Base Section -> Catalog Area - > Setting the table width.

 

U will see the knowledge base in the basic OSC site menu.

 

Read it and make me known.

 

Freelance PHP Programmmer

Share this post


Link to post
Share on other sites
Read in the OScommerce Knowledge Base Section -> Catalog Area - > Setting the table width.

 

U will see the knowledge base in the basic OSC site menu.

 

Read it and make me known.

 

Freelance PHP Programmmer

Well I'm using STS already and the width of the page is not a problem. Is the middle column that holds the content within a table I have, that column is set to 380 pixels but it keeps redimensioning to an automatic width.

Share this post


Link to post
Share on other sites
Well I'm using STS already and the width of the page is not a problem. Is the middle column that holds the content within a table I have, that column is set to 380 pixels but it keeps redimensioning to an automatic width.

 

In STS , check the template's width. See the HTML code of template.

 

U also can check WEBROOT_of_CATALOG/INDEX.PHP

 

WEBSEOS

Share this post


Link to post
Share on other sites

Hi,

 

I have installed the STS v.4.3 + HTC 2.5.9 package.

 

After adding the "headertags.php" to the "Files for normal template" as instructed, i get the following error in the catalog:

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/watchit/public_html/shop/includes/functions/clean_html_comments.php:13) in /home/watchit/public_html/shop/includes/functions/clean_html_comments.php on line 26

 

in the Index page.

 

The Ultimate SEO, Xsell and Articles contributions are also installed.

 

Please Help ho wise ones!!!

 

Thanks, Sharon.


Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

Share this post


Link to post
Share on other sites
Hi,

 

I have installed the STS v.4.3 + HTC 2.5.9 package.

 

After adding the "headertags.php" to the "Files for normal template" as instructed, i get the following error in the catalog:

in the Index page.

 

Don't hold me to this, but I seem to recall getting those errors, too. Did you chmod the necessary files to 755 or 777? I think that was my problem; the instruction to do that, together with the two files requiring it, is in the install directions, but it's easily overlooked.

 

If that's not it, hopefully somebody else will know.

 

Anne

Share this post


Link to post
Share on other sites

Hello..

 

After I relocated my entire database and pages to a new server, my index.php_0.html no longer works! What have I done? All my other specialty pages (ie index.php_12.html ) are working fine. Please help!!!

 

Thanks!

Share this post


Link to post
Share on other sites
Hi,

 

I have installed the STS v.4.3 + HTC 2.5.9 package.

 

After adding the "headertags.php" to the "Files for normal template" as instructed, i get the following error in the catalog:

 

 

 

in the Index page.

 

The Ultimate SEO, Xsell and Articles contributions are also installed.

 

Please Help ho wise ones!!!

 

Thanks, Sharon.

Be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Also: be sure that you have set the permissions according to the install manual.


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
Be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Also: be sure that you have set the permissions according to the install manual.

 

 

Thanks for the answer!!!

 

I tried it, but still - it does not work. have any other suggestions?

 

Thanks again, Sharon.


Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

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

×