Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi, has anyone used this contrib:

 

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

 

with STS product content templates?

 

or does anyone know whether it will work?

I used to use similar one with STS3

in STS 4

modify sts_inc/product_info.php

$prod_quantity = tep_get_products_stock($HTTP_GET_VARS['products_id']);

if ($prod_quantity > 0) {

$template_pinfo['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

} else {

$template_pinfo['addtocartbutton'] = '';

}

this will disable add to cartbutton if stock is 0

I also define $stock image wich is "Sold OUT"

$template_pinfo['stock']= '';

} else {

$template_pinfo['stock'] = tep_image('images/outofstock.jpg');

}

Edited by addicted
Link to comment
Share on other sites

HI

 

I've just installed STS V4.2 and I have a question:

 

When using the variables ($languagebox, $categorybox, etc...) it displays:

 

. Categories

Category 1

Category 2

Etc...

 

Is there any way to remove the ". Categories" at the top? Same goes for the language box, etc...

 

Thanks for any help.

 

Great contribution by the way!!

I think this is what you want:

 

 

 

To remove the header for the info boxes:

 

 

Open ./includes/classes/boxes.php

 

Inside the code, you will find this class definition:

 

class infoBoxHeading extends tableBox {

 

Go at the end of the class definition and edit this line:

 

$this->tableBox($info_box_contents, true);

 

Replace it with:

 

$this->tableBox($info_box_contents, false);

 

 

Hope it helps,

 

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

Any ideas for me bkellum?
I do not understand why you would want those pages indexed by the search engines. If your site is setup properly, then the search engines won't list pages like checkout process and create account so it serves no purpose to have header tags code installed in those files. You only need to add the code to the files that will be listed in the search engine listings.

 

If you absolutely need to have those pages indexed, it would probably be easier to add the meta tags and page title manually in the HTML of your specific template for those individual pages.

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 installed the newest STS version on my website along with header tags, error free. I then added PWA to my site as well. Now I get this error at any part of my site (except admin):

 

Fatal error: Call to a member function on a non-object in /nfsn/content/atelier/htdocs/includes/header.php on line 14

 

I don't have the exact line of code this refers too, but if one of you look at yours its one or two lines of code right at the beginning of header.php and has something like \\STS start and \\STS end before and after it. When i disable this line of code (add a \\) then the site works again, but STS evidently is not working. Any help would be appreciated becuase I am not very fluent with php (just know how to get around) and would like to start using STS. Thanks!

STUFF TO DO:

-change boxes on left side to desired style

-remove default mini pictures (cartoon ones)

-modify some of the text colors

-change text headings ("Whats new here" etc.)

-add shipping modules

-add credit card module that allows to stay on my site

-remove all or all but 3 of the "new products" at bottom of main screen

-change button styles

-add SSL

-add the products from TIGI

Link to comment
Share on other sites

when I use $content instead product inflo template everything works perfekt

when swtich to product_info template

buton add to cart do nothing and reviews do nothing too

 

http://www.atrakcia.com/product_info.php?products_id=1

this is my test site, pls ignore mess with styles images

first buton is review second is add to card

any ideas where is the problem.

Second issue (I think it was answered earlier) is how to avoid modifications of the boxes like advance search when using STS Infobox addon

how will act STS if I don't have default template for infobox, but template for every single box, will this bring normal look of advance search ?

Any help would be appreciated

Thank you for your support

Edited by addicted
Link to comment
Share on other sites

Hello,

 

I've just installed oscommerce for the first time on my FreeBSD machine, together with the latest version of STS. Oscommerce works great, except that I can't enable STS!

 

I go to the STS modules page, click the Default line and set the 'Do you want to use Simple Template System?' option to 'true'. Then I click Update, and when I'm returned to the STS modules page, it says 'false'. No errors seem to occur, it just refuses to enable :-)

 

Please could you advise?

 

Thanks,

 

Philip.

Link to comment
Share on other sites

Hello,

 

I've just installed oscommerce for the first time on my FreeBSD machine, together with the latest version of STS. Oscommerce works great, except that I can't enable STS!

 

I go to the STS modules page, click the Default line and set the 'Do you want to use Simple Template System?' option to 'true'. Then I click Update, and when I'm returned to the STS modules page, it says 'false'. No errors seem to occur, it just refuses to enable :-)

 

Please could you advise?

 

Thanks,

 

Philip.

file permisions ?

I think that sts settings are not stored in database

Link to comment
Share on other sites

I suppose it's possible there's a file permissions problem. Which files should I check, and what should their permissions be, please?

 

Thanks,

 

Philip.

apache web server was installed from freebsd ports?

defaul user is www group www

chown to www, should be OK

Link to comment
Share on other sites

Yep, everything chown'ed to www, but the behaviour is still the same. Any more ideas please?

 

Thanks,

 

Philip.

hmm

f you are experiencing problems getting the STS module to activate in the admin and you are using osCommerce update 060817, use this patch to get it working.

Also:

The official support forum for STSv4.2 can be found at:

http://www.oscommerce.com/forums/index.php?s=&...st&p=913548

Please use this forum to post all related topics to STSv4.2.

Thanks, Bill Kellum

did you try that ?

lates in STS contribution ?

Link to comment
Share on other sites

May I ask another question?

 

It is regarding category templates. I have searched the thread and read the questions regarding this and I have also read the documentation but I still can't figure it out.

 

I have a music category, the end of the URL for this category is: .com/music-tshirts-c-21.html

 

I want to use an alternative individual template for it. What do I call this template and where do I put it? Also what additions do I make on the admin side and where exactly do I paste the new template?

 

Thanks again and apologies for my ignorance.

Link to comment
Share on other sites

May I ask another question?

 

It is regarding category templates. I have searched the thread and read the questions regarding this and I have also read the documentation but I still can't figure it out.

 

I have a music category, the end of the URL for this category is: .com/music-tshirts-c-21.html

 

I want to use an alternative individual template for it. What do I call this template and where do I put it? Also what additions do I make on the admin side and where exactly do I paste the new template?

 

Thanks again and apologies for my ignorance.

 

main (first, index) page must be index.php_0.html

usually I use category ID

for example index.php_110_132.html. I haven't tasted with STS4 but STS3 also works with index.php_132.html

files must be int template directrory, specified in admin panel

so try index.php_21.html

its seems that you have Ultimate SEO installed

 

Excuse me for my english

Edited by addicted
Link to comment
Share on other sites

hmm

f you are experiencing problems getting the STS module to activate in the admin and you are using osCommerce update 060817, use this patch to get it working.

 

Thanks for the reply Bill, but what patch can I use to get it working? Is there a patch reference or link you can provide?

 

Thanks,

 

Philip.

Link to comment
Share on other sites

I've just installed the newest STS version on my website along with header tags, error free. I then added PWA to my site as well. Now I get this error at any part of my site (except admin):

 

 

Fatal error: Call to a member function on a non-object in /nfsn/content/atelier/htdocs/includes/header.php on line 14

 

 

I don't have the exact line of code this refers too, but if one of you look at yours its one or two lines of code right at the beginning of header.php and has something like \\STS start and \\STS end before and after it. When i disable this line of code (add a \\) then the site works again, but STS evidently is not working. Any help would be appreciated becuase I am not very fluent with php (just know how to get around) and would like to start using STS. Thanks!

STUFF TO DO:

-change boxes on left side to desired style

-remove default mini pictures (cartoon ones)

-modify some of the text colors

-change text headings ("Whats new here" etc.)

-add shipping modules

-add credit card module that allows to stay on my site

-remove all or all but 3 of the "new products" at bottom of main screen

-change button styles

-add SSL

-add the products from TIGI

Link to comment
Share on other sites

I've just installed the newest STS version on my website along with header tags, error free. I then added PWA to my site as well. Now I get this error at any part of my site (except admin):

 

 

Fatal error: Call to a member function on a non-object in /nfsn/content/atelier/htdocs/includes/header.php on line 14

 

 

I don't have the exact line of code this refers too, but if one of you look at yours its one or two lines of code right at the beginning of header.php and has something like \\STS start and \\STS end before and after it. When i disable this line of code (add a \\) then the site works again, but STS evidently is not working. Any help would be appreciated becuase I am not very fluent with php (just know how to get around) and would like to start using STS. Thanks!

Sorry, but what is PWA? If I was troubleshooting this, I would start with the header.php file from both contributions to see what is conflicting. If I did not find anything there, I would compare both contributions entirely.

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

May I ask another question?

 

It is regarding category templates. I have searched the thread and read the questions regarding this and I have also read the documentation but I still can't figure it out.

 

I have a music category, the end of the URL for this category is: .com/music-tshirts-c-21.html

 

I want to use an alternative individual template for it. What do I call this template and where do I put it? Also what additions do I make on the admin side and where exactly do I paste the new template?

 

Thanks again and apologies for my ignorance.

STS template structure:

 

It is best to save your default template file as sts_template.html. 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. A flow chart is available 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.

? Now following the above two examples, let?s create a custom template for a specific product in Category 1, sub-category 9, product ID 26. This is the ?out of the box? osCommerce ?Microsoft IntelliMouse Explorer? product.

You would need to create a template and save it as ?index.php_1_9_26.html?. 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?.

 

The same procedure goes for any ?content? templates you would have created. Please use the above ?mini-tutorial? to guide you through the ?content? template process. :thumbsup:

 

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

 

Bill Kellum

Sounds Good Productions

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

STS template structure:

 

It is best to save your default template file as sts_template.html. 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. A flow chart is available 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.

? Now following the above two examples, let's create a custom template for a specific product in Category 1, sub-category 9, product ID 26. This is the "out of the box" osCommerce "Microsoft IntelliMouse Explorer" product.

You would need to create a template and save it as "index.php_1_9_26.html". 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".

 

The same procedure goes for any "content" templates you would have created. Please use the above "mini-tutorial" to guide you through the "content" template process. :thumbsup:

 

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

 

Bill Kellum

Sounds Good Productions

Be sure to activate the Index and Product Info modules in the admin to use the above features.

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

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