Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Actually, it does. It states that it is still under development. I can see how it can be misleading though. :blink:

 

Glad you got it worked out,

 

I meant mention it in the STS User Manual.

Link to comment
Share on other sites

I meant mention it in the STS User Manual.

 

Again, this is not a STS specific problem so it should not be listed in the STS User Manual. It would be better served in the osCommerce Knowledge Base for every user, STS and Non-STS users alike.

 

:thumbsup: So as not to confuse anyone, the feature "Use Search Engine Friendly URLS" in the osCommerce admin does not work, whether you use STS or not. That is why is states "(Still in development)". It really should be removed from the stock osC since it causes more headache than anything else. Since osC is an open source project, I can see the reasoning for leaving it there to allow someone the opportunity to correct it and make it useable. Currently, it is not.

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

We are coming at this from slightly different angles ;) I am saying;

 

using nested tables to create a design and/or using graphics to create curves

 

is unsuitable whether or not you are using STS.

 

Make a bit more sense now?

 

Yep, thanks.

 

Of course when you've got a deadline, it'll due. Plus, I'm the technical side of the site, the appearance is down to another, and since we don't get any feedback from management until something is up there, it's all we can go on.

 

Later on, for the next template, may get a bit wild with DIVs or whatever you and others suggest.

Edited by AJStevens
Link to comment
Share on other sites

A colleague of mine has pointed out our formatting is not right on a hidden page.

 

Click Advanced Search, then the "Search Help [?]" hyperlink to get a small page popup_search_help.php

 

Interestingly... it seems to pick up on my infobox_header.php.html for the corner images ok.

 

However it's getting the default stylesheet, instead of the one I put in the folder, which I call in sts_template.html using <link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">.

 

Anyone else experienced this? I need a fix asap please.

Link to comment
Share on other sites

Also, rather more urgently, we're setting up a payment method using the ePDQ module, it's important that on the checkout_confirmation.php the button for Confirm Order points to https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e however, the referrer should be just http://.../checkout_confirmation.php but instead it has the ?OscSid=whatever on the end, it must not add that to the end. Is this because of STS? Is there a way round it?

Link to comment
Share on other sites

Also, rather more urgently, we're setting up a payment method using the ePDQ module, it's important that on the checkout_confirmation.php the button for Confirm Order points to https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e however, the referrer should be just http://.../checkout_confirmation.php but instead it has the ?OscSid=whatever on the end, it must not add that to the end. Is this because of STS? Is there a way round it?

Nothing to do with STS. If the link is created in checkou_confirmation.php, that would be the place to look.

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've just set up OSC and have a questions about styling. I already have the basic structure of the page that I want to embed the shopping cart code in to. In this instance I'm only selling one product, and will be using paypal pro to process. Is there a simple way to implement the store within a page that I have already constructed? I've got the style sheet, all the images - everything is done. I just need to implement the shopping cart in to this page and subsequent pages. I'm not a coder, by any stretch - I know html, and css. I appreciate any help that anyone might have!

Link to comment
Share on other sites

I've just set up OSC and have a questions about styling. I already have the basic structure of the page that I want to embed the shopping cart code in to. In this instance I'm only selling one product, and will be using paypal pro to process. Is there a simple way to implement the store within a page that I have already constructed? I've got the style sheet, all the images - everything is done. I just need to implement the shopping cart in to this page and subsequent pages. I'm not a coder, by any stretch - I know html, and css. I appreciate any help that anyone might have!

You would need to install STS first.

Then, keep the default settings in the STS Modules in the admin except for:

  • Enable the Default Module
  • Set Default Module to Use Templates=True
  • Set Default Module to use the Full Templates Folder
  • Set Default Module to use Infobox Templates (optional)
  • Enable the Index Module
  • Set the Index Module to True.

Now, open the "sts_blank_template.html" from the test folder. The purpose of this sample template is to show you what code is required in order to turn any web page into a STS template that has osCommerce functionallity to it. Copy the required code from this template and paste it into the top of your layout.

 

Now you can start adding the STS tags wherever you want to bring specific osC functions into your layout. For example, if you want to bring in the search box into your layout, you would use the $searchbox STS tag.

 

More details in the docs folder of the contribution.

 

If your layout is a purchased template for osCommerce, see the following step by step guied on how to convert to a STS template:

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

 

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

STSv4.5.8, HeaderTags 2.6.3, 'Ultra Pics 2.07.01 - incl. STS + CCGV + LightBox'.

 

Store is coming along but ran in to a problem today. I'm trying to use a content template to change the layout of the product_info content. It worked well with the exception of my extra images. How would I go about including this element in my content template?

 

Thank you!

Link to comment
Share on other sites

STSv4.5.8, HeaderTags 2.6.3, 'Ultra Pics 2.07.01 - incl. STS + CCGV + LightBox'.

 

Store is coming along but ran in to a problem today. I'm trying to use a content template to change the layout of the product_info content. It worked well with the exception of my extra images. How would I go about including this element in my content template?

 

Thank you!

You would need to modify the sts_inc/product_info.php file.

 

:thumbsup: Any contribution that modifies the stock product_info.php file would also need to make those same modifications in the sts_inc/product_info.php file ONLY if you intend to use product info content templates.

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

A colleague of mine has pointed out our formatting is not right on a hidden page.

 

Click Advanced Search, then the "Search Help [?]" hyperlink to get a small page popup_search_help.php

 

Interestingly... it seems to pick up on my infobox_header.php.html for the corner images ok.

 

However it's getting the default stylesheet, instead of the one I put in the folder, which I call in sts_template.html using <link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">.

 

Anyone else experienced this? I need a fix asap please.

 

How can I get popup_search_help.php to not only use infobox_header.php.html but also sts_template.html and the new stylesheet location?

 

Also, the sts_debug doesn't work on this page.

 

Update: Actually, it's only replacing the images, it's not actually fully listening to the infobox_header.php.html file as the td's and tr's don't match the others. So, it's only picking up that there are new images and using them instead of the default ones (same name), it's not actually applying a template or templates to it.

 

I suppose I need to poke around in sts and sts_inc?

Edited by AJStevens
Link to comment
Share on other sites

I have a question regarding items that are out of stock. I prefer to display out of stock items, but is it possible to display that they are out of stock in the product info page when using sts?

 

I couldn't find a placeholder for that and I'm not good with coding so I can't make it.

 

I thought about installing the Product quantity dropdown on info page contrib, but I don't know how to put the code into the sts_inc/product_info.php page

 

Sorry if the answer is already out there, I've tried searching this forum, contribs and even thru search engines and couldn't find anything.

 

Thanks in advance for any help!

Link to comment
Share on other sites

You would need to install STS first.

Then, keep the default settings in the STS Modules in the admin except for:

  • Enable the Default Module
  • Set Default Module to Use Templates=True
  • Set Default Module to use the Full Templates Folder
  • Set Default Module to use Infobox Templates (optional)
  • Enable the Index Module
  • Set the Index Module to True.

Now, open the "sts_blank_template.html" from the test folder. The purpose of this sample template is to show you what code is required in order to turn any web page into a STS template that has osCommerce functionallity to it. Copy the required code from this template and paste it into the top of your layout.

 

Now you can start adding the STS tags wherever you want to bring specific osC functions into your layout. For example, if you want to bring in the search box into your layout, you would use the $searchbox STS tag.

 

More details in the docs folder of the contribution.

 

If your layout is a purchased template for osCommerce, see the following step by step guied on how to convert to a STS template:

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

 

Hope this helped,

 

 

Thank you for your help.

 

I'm not entirely sure that I'm following you on the changes to the set up. I've got STS installed and here are the settings in STS from admin:

 

Default -

 

Use Templates? - True

Code for debug output - debug

fiels for normal template - sts_user_code.php

Base folder - includes/sts_templates

template folder - test

default template file - sts_template.html

use template for infoboxes - false

 

index -

 

use template for index page - true

file for index.php template - sts_user_code.php

check parent templates - true

 

popup page -

 

use tempalte for the image popup page - false

fies to include - popup_image.php

 

Product info -

 

use template for product info page - true

enable STS3 compatibility mode - false

files for normal template

sts_user_code.php

Files for content template - sts_user_code.php;product_info.php

 

I've complete the entire site that I will be implementing this shopping cart with, and I've written all the code, created all the images, along with the style sheets. My goal is to have an 'order now' page where it features this product(the site is a showcase site for this particular product), and takes the customer through the checkout process.

Link to comment
Share on other sites

Using the placeholder $catmenu causes a user to be logged out. The session id does not seem to be used.

 

I've seen similar comments in the forum, but no solutions.

 

Any ideas?

There is not a single post in this forum that connects the $catmenu tag to be the root of a session ID loss.

 

Some suggestions for you to look into:

  • Is your site on a local server or is it live? Most local servers by default are in "strict" mode, meaning no room for error on your part, and live shared servers are less stringent since they have to try to be everything to everyone. You will find that uploading to the live server hides a lot of errors you may have with your site's configuration.
  • Is your shop a stock osC with only STS installed or are there other contributions installed? If you have other contributions installed, check to be sure those addons are properly coded and do not deviate from the osCommerce standard (the way osC flows and functions). These addons could actually be the culprit of your session ID loss, even if it works with STS turned off. STS was coded according to osC standards and is PHP 4 and 5 compatible.

:thumbsup: Note: This IS NOT a global problem with STS. "Out of the box", STS and CATMENU retains the Session ID.

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

Trying to get some help.

 

I have STS with header tags installed and working ok and I also have SEO URLS.

 

I am trying to do the following and can not figure out how.

 

I have created a category called Archive. In this category I will place all the products that I have sold ( I sell unique items) for reference and for search engines.

 

So for this category only I want to list the products without the BUY NOW buttom. Also when a user clicks on that particular product I want the information to appear with out the Add To Cart bottom.

 

How can I use STS to do this?

 

thanks!

Link to comment
Share on other sites

Trying to get some help.

 

I have STS with header tags installed and working ok and I also have SEO URLS.

 

I am trying to do the following and can not figure out how.

 

I have created a category called Archive. In this category I will place all the products that I have sold ( I sell unique items) for reference and for search engines.

 

So for this category only I want to list the products without the BUY NOW buttom. Also when a user clicks on that particular product I want the information to appear with out the Add To Cart bottom.

 

How can I use STS to do this?

 

thanks!

Hello Tom,

 

There are a couple of ways to do this but the easiest would be to make a product info "content" template for your Archive category and leave out the price and add to cart STS tags.

 

You must have the Product Info STS Module enabled in the admin in order for this to work.

 

How it works, general template:

 

Main templates are templates containing the columns, header and footer. The center of the page only contains the $content placeholder.

With this module you have the possibility to define a separate "content template" that will replace the $content of the main template. Content templates must be located in the "content" folder inside the templates folder (such as includes/sts_templates/full/content)

 

When the module is enabled, it looks in the template folder to see what templates exist. It is possible to define templates based on the product ID or it's category ID. Templates must be located in the templates folder (such as includes/sts_templates/full) .It works as so (first found - first used):

 

1. Check for a main template based on the product ID, for example product with ID 4:

 

1.1 Use product_info.php_4.html if exists.

 

2. Check for category specific main template, based on the category ID where the product is located. (Example below with a product located in category 22, located in category 11)

 

2.1 Use product_info.php_c11_22.html if exists.

 

2.2 Use product_info.php_c11.html if exists.

 

2.3 Use product_info.php.html if exists.

 

3. No specific template found, use default template as defined in the default module (by default it is sts_template.html)

 

 

 

Now that we have a main template, look if there is a content template, based on product ID and the category where it belongs: example with product ID4:

 

1.1 Use product_info.php_4.html if exists.

 

2. Check for category specific content template, based on the category ID where the product is located. (Example below with a product located in category 22, located in category 11)

 

2.1 Use product_info.php_c11_22.html if exists.

 

2.2 Use product_info.php_c11.html if exists.

 

2.3 Use product_info.php.html if exists.

 

If no content template is found then do not use any, $content will come from the original catalog/product_info.php .

 

 

The above was taken from the docs folder in STSv4.5.8.

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

There is not a single post in this forum that connects the $catmenu tag to be the root of a session ID loss.

 

Some suggestions for you to look into:

  • Is your site on a local server or is it live? Most local servers by default are in "strict" mode, meaning no room for error on your part, and live shared servers are less stringent since they have to try to be everything to everyone. You will find that uploading to the live server hides a lot of errors you may have with your site's configuration.
  • Is your shop a stock osC with only STS installed or are there other contributions installed? If you have other contributions installed, check to be sure those addons are properly coded and do not deviate from the osCommerce standard (the way osC flows and functions). These addons could actually be the culprit of your session ID loss, even if it works with STS turned off. STS was coded according to osC standards and is PHP 4 and 5 compatible.

:thumbsup: Note: This IS NOT a global problem with STS. "Out of the box", STS and CATMENU retains the Session ID.

 

Bill

 

Thank you for your input.

 

Yes - having tested it, found that it only exists on my local testbed (XP, XAMPP etc). Clicking on any category in $catmenu causes 'customer-id' to be no longer registered - and the logout routine is not entered! Everything works normally on my hosting Unix server. Very mysterious - will keep investigating and post any further observations in case they are of use to anyone else.

 

Alan

Link to comment
Share on other sites

Update on post above:

 

Force Cookies = True (needed XP hosts file edited, plus changes to configure.php)

 

and now all works correctly.

 

 

Very bizarre.

Alan, Thank you so much for posting the results of your investigation. It goes a long way to help others who may have the same server issues. :thumbsup:

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 was just wondering how I would add a image in front of the text in $categorybox

 

eg;

 

34058808yj4.png category01

34058808yj4.png category02

 

Thanks

Link to comment
Share on other sites

Hi

 

I was just wondering how I would add a image in front of the text in $categorybox

 

eg;

 

34058808yj4.png category01

34058808yj4.png category02

 

Thanks

There are a couple different ways to accomplish this and really depends on your shop and your menu. The osC way would be to edit the boxes/categories.php file.

 

You could also install a contribution to do this for you:

Easy Bullets: http://www.oscommerce.com/community/contributions,568

More Options: http://www.oscommerce.com/community/contributions,2387

 

:thumbsup: Another option would be to install the Categories Box as a Nested Unordered List which allows you to style the menu items any way you want using CSS.

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

There are a couple different ways to accomplish this and really depends on your shop and your menu. The osC way would be to edit the boxes/categories.php file.

 

You could also install a contribution to do this for you:

Easy Bullets: http://www.oscommerce.com/community/contributions,568

More Options: http://www.oscommerce.com/community/contributions,2387

 

:thumbsup: Another option would be to install the Categories Box as a Nested Unordered List which allows you to style the menu items any way you want using CSS.

 

 

Awesome ,all working now thanks :thumbsup:

Edited by mme
Link to comment
Share on other sites

Hello Tom,

 

There are a couple of ways to do this but the easiest would be to make a product info "content" template for your Archive category and leave out the price and add to cart STS tags.

 

You must have the Product Info STS Module enabled in the admin in order for this to work.

 

How it works, general template:

 

Main templates are templates containing the columns, header and footer. The center of the page only contains the $content placeholder.

With this module you have the possibility to define a separate "content template" that will replace the $content of the main template. Content templates must be located in the "content" folder inside the templates folder (such as includes/sts_templates/full/content)

 

When the module is enabled, it looks in the template folder to see what templates exist. It is possible to define templates based on the product ID or it's category ID. Templates must be located in the templates folder (such as includes/sts_templates/full) .It works as so (first found - first used):

 

1. Check for a main template based on the product ID, for example product with ID 4:

 

1.1 Use product_info.php_4.html if exists.

 

2. Check for category specific main template, based on the category ID where the product is located. (Example below with a product located in category 22, located in category 11)

 

2.1 Use product_info.php_c11_22.html if exists.

 

2.2 Use product_info.php_c11.html if exists.

 

2.3 Use product_info.php.html if exists.

 

3. No specific template found, use default template as defined in the default module (by default it is sts_template.html)

 

 

 

Now that we have a main template, look if there is a content template, based on product ID and the category where it belongs: example with product ID4:

 

1.1 Use product_info.php_4.html if exists.

 

2. Check for category specific content template, based on the category ID where the product is located. (Example below with a product located in category 22, located in category 11)

 

2.1 Use product_info.php_c11_22.html if exists.

 

2.2 Use product_info.php_c11.html if exists.

 

2.3 Use product_info.php.html if exists.

 

If no content template is found then do not use any, $content will come from the original catalog/product_info.php .

The above was taken from the docs folder in STSv4.5.8.

Hope this helped,

 

 

Thanks for taking the time to respond. I will look into this and give it a try.

 

Thanks!

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