Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Guest

[Contribution] STS v4

Recommended Posts

Guest
New STS v4.4 is out:

 

- NEW: template for popup_image.php

- NEW: infobox template for the frame around the product listing (option).

- NEW: choose the templates folder from admin, not fixed anymore to includes/sts_templates

- NEW: place images and buttons in your template folder, they will be used instead of the default images and buttons. Thanks to Arnoldl for this one.

 

Have fun!

 

- Rigadin

 

 

 

" NEW: place images and buttons in your template folder, they will be used instead of the default images and buttons. "

 

I've tried to place my own images in my template folder : mytemplate/images/

 

However, not all images in my template images folder were used instead of default.

 

for those in contact page like , table_background_default.gif , my images was used instead of the one in the default images folder . o.k.

 

but for those in in the header , like header_account.gif , the one in the default images folder was used .

 

don't know why ? I 've searched this forum but could not find the answer.

 

any ideas what's might be wrong ?

Edited by jasonwai

Share this post


Link to post
Share on other sites
Mike, Make a backup of your application, files and database. You will need to remove the STS code from your previous installation from the following files:

 

Now delete the following files from your shop:

 

Before you delete the sts_user_code.php file, save any custom tags you may have created so that you can add them to your new sts_user_code.php file in STSv4.4 using the new syntax format as you will see in the new sts_user_code.php.

 

Hope this helps,

 

 

YOU BET IT HELPS!!

 

I'll give this process a try tomorrow and report back my results.

 

Thanks for your help.

 

Mike

Share this post


Link to post
Share on other sites
" NEW: place images and buttons in your template folder, they will be used instead of the default images and buttons. "

 

I've tried to place my own images in my template folder : mytemplate/images/

 

However, not all images in my template images folder were used instead of default.

 

for those in contact page like , table_background_default.gif , my images was used instead of the one in the default images folder . o.k.

 

but for those in in the header , like header_account.gif , the one in the default images folder was used .

 

don't know why ? I 've searched this forum but could not find the answer.

 

any ideas what's might be wrong ?

Jason, as of 3-9-2007, we only know of two bugs in the 4.4 release.

Check to be sure you have updated the following:

  1. At the very end of application_top.php, it should look like this:
    // START STS 4.1
     require (DIR_WS_CLASSES.'sts.php');
     $sts= new sts();
     $sts->start_capture();
     // END STS 4.1
    // 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');
    ?>


  2. Open the includes/modules/sts/sts_default.php file.
    Find:
    if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart")) {
    return ''; // We don't use template for these scripts
    
    $check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html";
    
    if (file_exists($check_file)) return $check_file;
    
     }


    Replace with (you will remove the brackets):

    if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
      return ''; // We don't use template for these scripts
    
    $check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html";
    
    if (file_exists($check_file)) return $check_file;


Other than the two bugs above, you should be able to use your template image folder to insert graphics named as their osC counterpart to replace the stock osC images.

Have you installed any modifications to your images in osC that may be causing the issues that you are having?


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
Guest
Jason, as of 3-9-2007, we only know of two bugs in the 4.4 release.

Check to be sure you have updated the following:

[*]At the very end of application_top.php, it should look like this:

// 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
require (DIR_WS_CLASSES.'sts.php');
$sts= new sts();
$sts->start_capture();
// END STS 4.1
?>

 

 

I'm using Additional Images contribution. would it cause the problem ?

Share this post


Link to post
Share on other sites
This is what I use and it is very similar to what you came up with:
<A HREF="java script:history.back()"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK); ?></a>

So, in the above, I use the back() function which will take the browser back to where it came and you used the back(1) which does the same thing. I also changed the button to a back button but a continue works as well. ;)

 

Great! Thanks Bill! :thumbsup:


~Tracy
 

Share this post


Link to post
Share on other sites
You can have a template for all products inside a category by adding the category ID to the template name. Of course an example is better:

 

Let say you have a category 22 inside category 11, and want all products in category 22 to use the same content template. You have to name this template product_info.php_c11_22.html and place it in the 'content' folder (like catalog/includes/sts_templates/full/content/).

 

In the same way, you can create a content template product_info.php_c11.html that will be used for all products inside category 11 AND sub-categories (unless subcategories have their own template).

 

Now, as you probably know, content templates are only for the center of the page. If you want different header/columns/footer for products in a category 22, you have to create product_info.php_c11_22.html and place it your template folder (not in the content folder), someting like catalog/includes/sts_templates/full/ .

 

This is explain in chapter 3.9 of the STS documentation.

 

- Rigadin

 

 

I know I'm replying to an old post but it's quite helpful, and I'm almost there!

 

What i'm looking for is how to make a template for the full-up category display. eg: i click on a category link and am presented with a table of all the items in that category. I can't seem to figure out how to alter this output in any way other than css. I'd like to template this page too, but with OSC using index.php for this task, the attempt below is all that I can come up with that suits the usual rules governing the template specifics.

 

I have tried the following:

 

Since my category link is /index.php?cPath=42

I've created an index.php_42.html page in my /sts_templates/mytemplate/content/ folder but this doesn't seem to take.

 

I have also tried putting an index.php_42.html page in the root template directory but of course that's just altering the template and not the $content, so no luck there.

 

I'm sure i'll feel like a dummy after I figure it out - but can anyone help speed up that 'feeling like a dummy' process?

 

Thanks

sean

Share this post


Link to post
Share on other sites

Hi,

 

I seem to be having afew problems,

 

I have followed all instructions step by step after adding STS 4.4

I show an error at the bottom of my main page saying:

 

Error!

 

Unable to determine the page link!

 

Also on my admin page I get the errors:

 

Warning: include(includes/languages/english/) [function.include]: failed to open stream: No such file or directory in /admin/includes/application_top.php on line 133

 

Warning: include() [function.include]: Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/local/php5/lib/php') in /admin/includes/application_top.php on line 133

 

Any ideas how to solve this?

 

Been searching this post and haven't found anything but if i have

missed where it explaines this please direct me to the answer.

 

Thank You,

 

Antony

Share this post


Link to post
Share on other sites
Hi,

 

I seem to be having afew problems,

 

I have followed all instructions step by step after adding STS 4.4

I show an error at the bottom of my main page saying:

 

Error!

 

Unable to determine the page link!

 

Also on my admin page I get the errors:

 

Warning: include(includes/languages/english/) [function.include]: failed to open stream: No such file or directory in /admin/includes/application_top.php on line 133

 

Warning: include() [function.include]: Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/local/php5/lib/php') in /admin/includes/application_top.php on line 133

 

Any ideas how to solve this?

 

Been searching this post and haven't found anything but if i have

missed where it explaines this please direct me to the answer.

 

Thank You,

 

Antony

Antony, be sure you corrected your application_top.php problem with the code changes below:

At the very end of application_top.php, it should look like this:

// START STS 4.1
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS 4.1
// 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');
?>


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
Antony, be sure you corrected your application_top.php problem with the code changes below:

At the very end of application_top.php, it should look like this:

// START STS 4.1
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS 4.1
// 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');
?>

 

I have done that, but still have the same problem :(

 

How about the application_top.php problem in admin files?

 

how should that one look?

 

Antony

Share this post


Link to post
Share on other sites

askez,

Make sure you modified the correct application_top.php file. OsCommerce has two such files. One in the "catalog/admin/includes/" folder and the one you need to edit in the "catalog/includes/" folder.

Edited by bkellum

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
askez,

Make sure you modified the correct application_top.php file. OsCommerce has two such files. One in the "catalog/admin/includes/" folder and the one you need to edit in the "catalog/includes/" folder.

 

I haven't touched the one in the admin folder but it seems to have a problem :S

 

Warning: include(includes/languages/english/) [function.include]: failed to open stream: No such file or directory in /admin/includes/application_top.php on line 132

 

Warning: include() [function.include]: Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/local/php5/lib/php') in /admin/includes/application_top.php on line 132

 

Antony

Share this post


Link to post
Share on other sites

This is repost of my earlier message....

 

I'm looking for tips on how to troubleshoot the header tags portion of this installation. I installed STSv42HTC259 on a clean OSC. I did not attempt to use the HTC part initially. After quite a bit of modifications to my site, I activated HTC according to the instructions and received a few parsing errors assocated with my allprods page (using the All Products V4.4b contribution) so I turned the header tags back off. I actually turned of STS at first and played around with HTC controls in admin. I then truned STS back on without HTC.

 

I later tried to turn HTC back on to troubleshoot. I don't get any errors. It just doesn't do anything. The only page titles I get is the main title defined in /catalog/includes/languages/english.php. I don't seem to have any of the HTC features.

 

I here is what I have setup for STS:

 

Default --> Use templates is set "true"

Files For Normal Template: sts_user_code.php; header_tags.php

 

Use templates is set "false" for Index and Product Info allthough I have experimented with setting true.

 

I have entered various titles in the Text Control area under Header Tags but nothing seems to change.

 

 

If anyone has any suggestions on how to troubleshoot this and get my page titles working I would appreciate it.

.....

 

Is this the wrong topic for me to post this? I didn't post it in the HTC area because I didn't think STSv42HTC259 was a full implementation of HTC.

Share this post


Link to post
Share on other sites

Keith,

The bundle is the same HTC as the original and works the same as the original except that you do not have to add the HTC code to every page in your site to make it work since STS does that for you with the tags in your <head> of your template.

So feel free to ask your HTC questions in the HTC forum.

I was not able to begin to start troubleshooting your problem because I have no idea what you have done on the HTC admin side in order to make it work such as Fill Tags or what options you chose. If you are getting parse errors it is most likely misplaced code so use a file compare utility such as Beyond Compare to compare your files with those in the bundle.


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
Keith,

The bundle is the same HTC as the original and works the same as the original except that you do not have to add the HTC code to every page in your site to make it work since STS does that for you with the tags in your <head> of your template.

So feel free to ask your HTC questions in the HTC forum.

I was not able to begin to start troubleshooting your problem because I have no idea what you have done on the HTC admin side in order to make it work such as Fill Tags or what options you chose. If you are getting parse errors it is most likely misplaced code so use a file compare utility such as Beyond Compare to compare your files with those in the bundle.

 

I'll post over there. I actually only got a parse error on the allprods page, which I think is because that contribution included the code for HTC in the allprods page. I assume both the STS and the allprods page were trying to fill the same tags. I turned off STS and the problem when away. I turned it back on and the problem did not return and the HTC didn't work. I can't figure out how that happened. I'm trying to figure out where to even start looking for the trouble.

Share this post


Link to post
Share on other sites

hi

i have a problem. as you can see in the link below , i have lost the design of the boxes.

 

Visit My Website

 

Do you have any idea why? i'm lost.....

Thanks for your help.

Share this post


Link to post
Share on other sites
hi

i have a problem. as you can see in the link below , i have lost the design of the boxes.

 

Visit My Website

 

Do you have any idea why? i'm lost.....

Thanks for your help.

Seffi, this could be from a couple of things.
  1. If you are NOT using infobox templates, then you need to be sure that you have the "Use Infobox Templates" setting set to "False" in the STS Default Module in your admin.
  2. If you are depending upon the stylesheet.css file to sytle your infoboxes, then you need to be sure you have the link to the stylesheet.css file in your template so STS knows where to look to bring in those styles.
  3. If you do have the link for the stylesheet.css in your template, then you must have changed something in your stylesheet.css file that is not doing what you want. For ex: If you wanted a gray background verses a white background, then your css setting should be
    .infoBoxContents {
     background: #bbc3d3;


So check the above and hopefully one of the items will help you out.


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
Guest

Hi all,

 

Easy question! I created my own infobox_catagories.php.html template. Made the background all nice and transparent. That worked. Good to go.

 

Now how would I customize the stock category links? ie make the font bigger, modify the roll over effect, maybe make some nice buttons and implement them?

 

Check out what I have Here

 

Thanks in advance!

-Dano

Share this post


Link to post
Share on other sites
Guest

I found it! .boxtext in the stylesheet.

 

Moving on...next question. How do I modify the rollover? How might I implement one of the dhtml vertical flyouts?

 

Thanks!

Share this post


Link to post
Share on other sites
Guest

ahover...found it!

 

I am interested in implementing a dynamic fly out menu. Which contribution is recommended? I am looking for a relatively easy implementation. Something that I can just add and adjust the look to.

 

Dano

Share this post


Link to post
Share on other sites

I have been searching for a way to customize certain outputs of my site, such as the produce listings.

Wondering if STS is the answer or maybe with the inclusion of another contribution?

 

What I am after is to have two types of product listings to display;

One similar to this - http://handeshobbies.com/Paint_Testors_Enamels_1.html#Top with no "More Info" and no "Large Image".

The other page to display something like this - http://handeshobbies.com/index_Test2.html with either; Large Image, Add to Cart, or More Info buttons added.

 

On my actual osC work in progress site, I utilized the Big Image and Dynamenu(?) contribs.

I would like to further customize the site with possibly Easypopulate and Graphical Borders contribs.

Test site - http://handeshobbies.com/catalog/

 

Thanks for looking and any help would be greatly appreciated.

 

Jim


- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites
Guest

I'm having trouble implementing dynamenu with my sts template. I've put all files to the server, I just need help placing the code

<?php include(DIR_WS_BOXES . 'dm_categories.php'); ?>

 

and

 

// Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];

 

Thanks,

Dano

Share this post


Link to post
Share on other sites
I'm having trouble implementing dynamenu with my sts template. I've put all files to the server, I just need help placing the code
<?php include(DIR_WS_BOXES . 'dm_categories.php'); ?>

 

and

 

// Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];

 

Thanks,

Dano

How to get Dynamenu to work with STSv4x

(There are a couple ways of implementing this so pay close attention to the "TIPS" that follow various steps)

 

1. Upload all of the files from the contribution.

 

2. Add the css code from the "dynamenu_for_osc_styles.txt" to your "stylesheet.css" file for the menu type that you would like to use in your templates.

 

3. You must include the following line of code in your template where you would like the menu to appear:

 

<?php include(DIR_WS_BOXES . 'dm_categories.php'); ?>

TIP: You can create a STS variable for the above and then just add the variable into your template inplace of the code above. If you decide to go this route, you can use the sample code below and insert it into your includes/modules/sts_inc/sts_user_code.php file:

 

$sts->start_capture();
require(DIR_WS_BOXES . 'dm_categories.php');
$sts->stop_capture('dmbox', 'box');

 

Now you can add the box into your STS Template pages by using the $dmbox tag (or $dmbox# depending on what you are using for your stop character).

 

4. You must include the following line of code in each of your templates that will be using the menu (The "footer" should be echoed *just before* the closing </BODY> tag.):

<?php echo $GLOBALS['dmfooter']; ?>

 

TIP 1: It may be easier to just create a file with the above code and then save this file to includes/modules/sts_inc/file_name and then add the file_name to the list of files to include in the STS admin.

TIP 2: It may be easier to just add the above line of code to your application_bottom.php file just before the last closing ?>.

 

If you do all of the above then STSv4x will work with Dynamenu. If you are modifying a new installation of STS, be sure you have STS installed and configured correctly before doing any of the above modifications.

 

NOTE: The above is also listed in the STS4 Power Pack contribution site.

 

Have fun,

Bill Kellum

Edited by bkellum

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
Guest

Awesome Bill!

 

I have set up a mock couple sub categories for "video cards", yet there is no flyout action when I click or mouse over. What needs adjusting?

 

Check it out here

 

I added all the flyout ccs to my ccs.

 

-Dano

Edited by dealindano

Share this post


Link to post
Share on other sites
Guest

Hello once again!

 

I am a bit myth'd as to how to create product pages, and where to locate them in my catalog directory. Someone mentioned something about category numbers. I found product_info.php_c26.html in the my sts_templates/full/content folder. I tried changing it to c1 to no avail.

 

I would like to set it up so a customer clicks on a category, then all the products for that category are listed with pictures/prices/short descriptions. Then when they click on the product, they would get the full description and different attribute options.

 

How might I set this up. What files do I need to create/modify? How can I find out my category ID numbers?

 

The dynamenu is still giving me a little grief, the submenu's are not functioning. Check it out here, and play some PONG!

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

×