Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Guest

[Contribution] STS v4

Recommended Posts

Guest
Hi everyone,

 

Is there a placeholder for "New Products For the month" box, pls. advise.

 

There is no such a placeholder because the box will is displayed by index.php, so it is part of $content.

 

If you want a placeholder for it, first remove the call to the box from index.php (2 places), then add a piece of code in sts_user_code.php to call the box and capture the result (example is in the file already), then modify your template to use this box. I think you should create a separate template for index.php so the box will not show up everywhere in your store.

 

- Rigadin2

Share this post


Link to post
Share on other sites
I'm still having trouble with the infobox templates=true.

 

The menu works perfectly when set to false.

 

I inserted the java script into the new infobox_dm_categories.php.html like you said...still no dice.

 

On your example page did you set infobox temps to true?

 

-Dano

Dano, my example page has the infobox template set to true. I added the JavaScript as mentioned earlier to the infobox_dm_categories.php.html template.

 

I am still working on finding a better solution to this problem. I found that the current solution only works for the vertical flyout menu in a box. If you change the settings to display the menu without a box, then the flyout no longer works. This tells me that the JavaScript is still being ignored by STS.

I'm thinking along the lines of listing some of the Dynamenu files in the includes list in the STS Module and that might fix the problem. Otherwise, making a link to the JavaScript from the template itself. Eitherway, the problem resides with STS not bringing in the JavaScript that the dm_categories.php file is asking for.

 

Furthermore, the latest additions to STS (4.3.1 & 4.3.2) is what needs to be looked at. Dynamenu worked with STS4.2 with the STS Infobox Templates addon. This should help in narrowing down the problem.

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

Ah...

 

I've been trying with the horizontal dropdown, thats the foul.

 

I appreciate you looking into this!

 

Post if you find a fix.

 

Thanks again,

Dano

Share this post


Link to post
Share on other sites

STS power pack EZ new fields question.

Does anyone know if you can use STS power pack EZ new fields to capture any field in your

products table and then put it into your sts template content? I not sure if this will work for any field or just "retail price" as the EZ new fields documentation shows.

 

Thanks.

Share this post


Link to post
Share on other sites

I can't understand how to make a specific template for a file. I've read the instructions but I still don't get it. I'm using the latest STS.

 

When using the old STS 3, I could just paste this into sts_display_output.php;

 

if ($scriptbasename == "mypage.php") {
array_push($sts_template_array, STS_TEMPLATE_DIR . "mypage.html");
 }

 

How can get the same result?

 

Please help me, I am going to show the shop in 1,5 hours.. :'(

Edited by Fredrik.r

Share this post


Link to post
Share on other sites
I can't understand how to make a specific template for a file. I've read the instructions but I still don't get it. I'm using the latest STS.

 

When using the old STS 3, I could just paste this into sts_display_output.php;

 

if ($scriptbasename == "mypage.php") {
array_push($sts_template_array, STS_TEMPLATE_DIR . "mypage.html");
 }

 

How can get the same result?

 

Please help me, I am going to show the shop in 1,5 hours.. :'(

Fredrik,

This is very simple if you are trying to add a osC script. For ex: If you want to make a template for specials.php, then you just create a template in your sts_templates/my_templates folder called specials.php.html.

If you are wanting to create templates for custom pages in osC such as newpage.php, then I suggest giving a look at the STS4 Power Pack addon for new pages. (see link in my signature below). It is a very easy straight forward process.

 

If you tried the above and it has not gone well for you, perhaps you did not make the bug fix listed on page 86 of this forum that prevents the scriptbase name to be templated.

 

Hope this helped you out,

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

Thank you! So if I've made my own pages (like about-company-name.php), then I will need STS Power Pack?

Share this post


Link to post
Share on other sites
Thank you! So if I've made my own pages (like about-company-name.php), then I will need STS Power Pack?
No, you already have everything that you need...just the addons listed in the Power Pack Contribution site will show you how it's done.

The STS4 Power Pack is more of a list of addons that will make your life easier using STS with other contributions or even mundain tasks such as adding new pages. :thumbsup:

Hopefully, other STS users will continue to add to the Power Pack site with bundled STS contributions, custom STS tags, Templates and any other easy additions of their own. :thumbsup: :thumbsup: :thumbsup:

 

Have fun,


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

 

I installed all four modules of STS onto a new installation of OSCommerce and on the front catalog page I just see the default template that came with OSCommerce, not the STS template I an suppose to see. I installed all four modules and turned all the "false" values to "true" values, and I have no clue why the front catalog page isn't mimicking the sts template page! My site is at http://harrisonjordan.com/os/catalog/

Share this post


Link to post
Share on other sites
Hi there,

 

I installed all four modules of STS onto a new installation of OSCommerce and on the front catalog page I just see the default template that came with OSCommerce, not the STS template I an suppose to see. I installed all four modules and turned all the "false" values to "true" values, and I have no clue why the front catalog page isn't mimicking the sts template page! My site is at http://harrisonjordan.com/os/catalog/

Harrison, You have not completed the installation on the catalog/includes side such as the catalog/includes/application_top.php & application_bottom.php & header.php, etc.


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

Wow thanks bill. Totally worked. I tested my site was a template from another site.... Here's my site again: http://harrisonjordan.com/os/catalog/

 

I still see remnants of the old template. For example the Categories and Quick Find sections are still on a greyish background. How can I check the colour or look of these boxes? I looked through the admin menus but I couldn't find how to...

 

HJ

Share this post


Link to post
Share on other sites
Wow thanks bill. Totally worked. I tested my site was a template from another site.... Here's my site again: http://harrisonjordan.com/os/catalog/

 

I still see remnants of the old template. For example the Categories and Quick Find sections are still on a greyish background. How can I check the colour or look of these boxes? I looked through the admin menus but I couldn't find how to...

 

HJ

You can edit the infoboxes in the catalog/stylesheet.css file and through the infobox template features of STSv4.4 itself. You will have to change your template folder to the "full" folder in the STS Default Module in admin and save your infobox templates in the catalog/includes/sts_templates/full/boxes folder.

If you created your own template folder (sts_templates/my_templates) then be sure to copy the "boxes" folder from the "full" template folder into your new template folder. For ex: catalog/includes/sts_templates/my_templates/boxes.


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

By editing the templates in the "boxes" folder, you mean the blahblahblah.php.html files correct????

 

Also, do you suggest changing the stylesheet or changing the "boxes" templates, or both? Or will one override the other one when you edit both?

 

Thanks

 

HJ

Edited by harrydude

Share this post


Link to post
Share on other sites
By editing the templates in the "boxes" folder, you mean the blahblahblah.php.html files correct????

 

Also, do you suggest changing the stylesheet or changing the "boxes" templates, or both? Or will one override the other one when you edit both?

 

Thanks

 

HJ

I was referring to the catalog/includes/sts_templates/your_template_folder/boxes. You will find some sample infobox templates in their just to get you started and give you a general idea how the naming syntax works.

Yes, you will most likely want/need to edit both the stylesheet.css and the infobox templates depending upon what you are wanting to do with the infobox.


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

Is there any info around in regard to building with layers and using STS?

 

I am a novice with dreamweaver, but really like working with layers.

 

How would I layout a template?

 

Would I use tables in layers?

 

What about positioning?

 

Relative? Absolute?

 

Any tips, tricks or links regarding layers and STS would be appreciated.

 

-Dano

Share this post


Link to post
Share on other sites

Dano, layers should work, just make sure you put in the appropriate STS tags. If you use relative positioning, the infoboxes and other content will also take on the relative positioning, etc.

 

 

BILL, I tried editing the colours of the infoboxes using stylesheet.css and it worked like a charm. But when I tried to edit the files inside the "boxes" folder, nothing changes. I am talking about the files that appeared in "boxes" when I instealled STS. This includes catalog_advanced_search.php.html, catalog_shopping_cart.php.html, infobox_information_header.php.html, infobox_information.php.html, infobox_product_listing.php.html and infobox.php.html.....

 

I have already tried changing the colours and editing these files, but nothing changes on my catalog page (but I do know I have STS installed with all the proper components). Is there some setting that allows STS/OsCommerce to pick up on the templates in the "boxes" folder? Also, which of the 6 files in "boxes" should I primarily change in order to change the appearence of the infoboxes?

 

Thanks

in

advance

 

Harrison

(Bill, do you have some sort of PayPal donation thing, I'd love to donate some money for all the help you've provided on the forums).

Share this post


Link to post
Share on other sites

Dano, layers should work, just make sure you put in the appropriate STS tags. If you use relative positioning, the infoboxes and other content will also take on the relative positioning, etc.

 

 

BILL, I tried editing the colours of the infoboxes using stylesheet.css and it worked like a charm. But when I tried to edit the files inside the "boxes" folder, nothing changes. I am talking about the files that appeared in "boxes" when I instealled STS. This includes catalog_advanced_search.php.html, catalog_shopping_cart.php.html, infobox_information_header.php.html, infobox_information.php.html, infobox_product_listing.php.html and infobox.php.html.....

 

I have already tried changing the colours and editing these files, but nothing changes on my catalog page (but I do know I have STS installed with all the proper components). Is there some setting that allows STS/OsCommerce to pick up on the templates in the "boxes" folder? Also, which of the 6 files in "boxes" should I primarily change in order to change the appearence of the infoboxes?

 

Thanks

in

advance

 

Harrison

(Bill, do you have some sort of PayPal donation thing, I'd love to donate some money for all the help you've provided on the forums).

Share this post


Link to post
Share on other sites

Harrison,

You are experiencing the two bugs in STSv4.4:

 

Bug fix 1 of 2 can be found at: http://forums.oscommerce.com/index.php?s=&...t&p=1023674

 

At the very end of application_top.php, it should look like this (need to place STS code before the message stack code):

 

 
// 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');
?>

 

Bug fix 2 of 2 can be found at: http://forums.oscommerce.com/index.php?s=&...t&p=1037770

 

Templates are not being recognized by STS.

 

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 bracket):

 

 

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;

If you leave the brackets "as is", then you will experience templates not being recognized by STS.

Note: My web site is listed in my osCommerce forum profile. Thanks for the kind words. :lol:


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

The site that I am working on http://www.runin.com/store/ has a couple of small issues that maybe you can help me with.

1. The info boxes are going 100% from side to side and I would like for them to stay around 95% but when I tried to change it... it did nothing.

2. The bigger of the two problems is that if you click on any of the info boxes... it says, "Error! Unable to determine the page link!". Can anyone point out what I'm doing wrong here?

 

Everything is a new install with the lates version of STS Power pack. Thank you for your time.

Share this post


Link to post
Share on other sites
Guest
The site that I am working on http://www.runin.com/store/ has a couple of small issues that maybe you can help me with.

1. The info boxes are going 100% from side to side and I would like for them to stay around 95% but when I tried to change it... it did nothing.

2. The bigger of the two problems is that if you click on any of the info boxes... it says, "Error! Unable to determine the page link!". Can anyone point out what I'm doing wrong here?

 

Everything is a new install with the lates version of STS Power pack. Thank you for your time.

 

Okay, I have figured out why I was getting the "Error! Unable to determine the page link!".... I had turned on the "Use Search-Engine Safe URLs" in the Admin -> Config -> My Store. Turned it off and it fixed my issue but the store is extreamly slow loading each page... Does anyone know how to speed it up? Fix the Info Boxes from going 100%? And make the images look cleaner? I have spent hours trying to clean these images in photoshop and the webstore doesn't do them justice. Thanks again for any help.

Share this post


Link to post
Share on other sites

Is there any reason why STS 4.4 is stripping out DIV and SPAN tags from catalog/includes/sts_templates/full/boxes/infobox_specials_header.php.html - or ANY specific infobox_{infobox-name}.php.html file, for that matter? If I put the $headertext inside (those evil) TABLEs, the file comes through fine. But trying to build the infobox out of nothing but a DIV seems to make the system completely omit that .php.html file. <_<

 

Even worse, when I try to trick it and surround the TABLE with a DIV, the system strips the opening DIV tag, but leaves the closing /DIV in, causing even more havoc. Surrounding the DIV with a TABLE works as expected, however. :blink:

 

On a similar topic, why doesn't having one simple catalog/includes/sts_templates/full/boxes/infobox.php.html file affect anything but the infoboxes in the center column? I'd like to be able to adjust the appearance of all the side infoboxes at once, but that file doesn't seem to affect them.

Share this post


Link to post
Share on other sites

Hello,

 

I am working on a site that was built from the most current vers. of OSC with the STS 4.3.3 contribution installed, working perfectly with my own custom-built templates inside a folder called 'full' within includes/sts_templates. I just attempted to upgrade to STS vers. 4.4. I had a problem (below) and found within this forum a fix for 2 'bugs'. The one to application.top and the one to the sts_default.php (removing brackets). I applied both fixes. Here's what I get, applying those fixes did not change anything:

 

Upon loading the store/index.php file into browser, at the very top:

 

Template file does not exist: [MODULE_STS_TEMPLATES_FOLDERfull/index.content.php.html]

 

The template displayed is the standard, unmodified/non-custom template.

 

I noticed that in my ADMIN of the STS default module there is now a field for a 'basefolder'. This field appears without a label above it and its text field/input box is blank. Seems like an addition to my DB should have been made to accomodate this new parameter but I made no changes to my DB according to the upgrade instructions I followed. Did I miss something? Any help would be appreciated. I guess I could always just revert to my previous vers. but I would very much like to keep current on all future upgrades of this excellent contribution.

 

Thanks,

 

gaus

Share this post


Link to post
Share on other sites

Uninstalled module, re-installed, DB was amended and everything works now. Simple enough.

 

gaus

Share this post


Link to post
Share on other sites

Hello everybody!

 

I have created new pages in my store and everything works great!

thank you very much Bill and Becky for helping me understand how to do so... (i even have new $placeholders and working text links.) :)

 

but i still have one problem :'(

 

ok, my question is this:

i want to know how to make the images links on the top navigation bar (Visit My Website)

(the SOLUTIONS,PRODUCTS,ORDERING...) work properly and carry on the SID.

i tried using tep_href_link, but i didn't know where to put it

 

the HTML code used for the pictures in the menu goes like this:

<div id="p7TBtrig10" style="position:absolute; left: 10px; top: 77px; width: 128px; z-index: 300; visibility: visible"><a href="../../../solutionshp.html" onmouseover="P7_trigMM2('p7TBim10')"><img src="../../../m2img/hbnb1.gif" alt="solutions" name="p7TBim10" id="p7TBim10" width="128" height="22" border="0" /></a></div>

 

can anyone please tell me how to add the tep_href_link? or if there is another way...

 

i would really appreciate any help you can give.

 

seffi.

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

×