[Contribution] STS v4
#41
Posted 15 April 2006, 17:38
#42
Posted 16 April 2006, 00:16
bkellum, on Apr 14 2006, 09:24 PM, said:
I did a clean install on one of my stores and all went as described in the original install document supplied with the STS v4.1 contribution.
Hope this helps, Bill Kellum
Thanks for response Bill. I am using the sts.php file that came with the fresh installation of STS v.4.1. My $footer still not working.
any ideas?
My Store Project
Edited by kokus, 16 April 2006, 00:18.
#43
Posted 16 April 2006, 01:14
bkellum, on Apr 14 2006, 02:24 PM, said:
For one of my clients, I designed a separate home page with a link to his shop, all done with STS v4. You can view it here: http://www.hatoverheels.com. Once on the home page, click on "hatalog" and then on one of the catagories to view the shop.
I don't know if this is what your asking or not. Hope I was able to help you out.
Bill Kellum
Bill,
Thank you so much for getting back to me. Yes if I put an index.html in my root it is the page that shows up when you enter the site. However if you click the "Continue" buttons, on several of the pages, it takes you to index.php - hence my problem.
As far as having to create separate templates for every page in the site (if I make an index.php.html template) - that seems like overkill to me.
Although I have several years experience in 4GLs and relational databases, this is my first OSC store, and I am trying to create as elegant of an approach as possible to meet most of the forseen needs of future stores.
Based on my research I decided to have my base functionality embodied in OSC/STS/PageHeader and attempt to handle other mods by editing php directly. Since I am hesitant to want to create separate templates for every page, I am leaning toward modifying the php code behind the "Continue" buttons to point to index.html instead of index.php.
Do you know of an easy way of globally changing the continue buttons to go to index.html?
Are there other buttons/links that reference index.php and need to be changed too?
Mucho mahalos,
PS - wouldn't it be better if the Continue button was a bit smarter? Instead of always going back to index.php it would go to the last product listing or what ever else is most relavent.
#44
Posted 16 April 2006, 01:39
Hunabku, on Apr 15 2006, 07:14 PM, said:
Either way, here is some code for you to mess around with that may be the solution to your problem:
In shopping_cart.php, replace:
$back = sizeof($navigation->path)-2;
with
$back = sizeof($navigation->path)-3;
In the above scenario, the continue button will bring the customer back to the category or listing they were last viewing, before adding a product to their cart.
I'm sure you could play around with this code to get it to do what you are looking for. I'm sorry I couldn't give you the exact code since I wasn't really sure what you were wanting to do. I'm on pain killers at the moment for a recent hernia surgery so things aren't so clear for me.
Hope this helps,
Bill Kellum
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#45
Posted 16 April 2006, 03:14
Hey trooper - thanks for the help amidst your recovery. I know about painkillers having that devil may care mind numbing effect - get well soon.
I'll spend some more time searching the main forum for a solution to the "Continue" button. Basically I am refering to the "Continue" that appears at the bottom of Shipping & Returns, Conditions of Use, etc. and even the shopping cart when it is empty. in all these cases clicking Continue takes you to "index.php". I would like to go to index.html - I'll probably have to change it in each php file - shouldn't be too hard.
Edited by Hunabku, 16 April 2006, 03:18.
#46
Posted 16 April 2006, 16:39
1. Sorry for mine in English, I am German
2. I have installed yours contib and now have following problem with the HeaderTagContoller. However, so far everything functions quite well he does not register me in metadaten the product name and the product description. Only the shop name. if I the template off he indicates me all Metadaten again. It is natural for product searching machines badly if the metadaten are absent. Can you help me there?
thanks chris
#47
Posted 17 April 2006, 08:40
When installing STS 4.1, my problem was that I had removed my /catalog subdirectory altogether. I think I installed everything correctly, changed all of the necessary files correctly, but since I don't have the /catalog subdirectory, I think the admin/modules.php file messed me up.
Can I just make some changes to the script so that wherever it says where the modules are, I am directing it to the right place....(instead of "$module_directory = DIR_FS_CATALOG_MODULES . 'sts/';" it should say...?) Or am I just completely confused? I read in the Install Readme file about what to do if you renamed your /catalog subdirectory to "shop" or "store" but I think I need a clearer walkthrough....help please?? Thanks a lot!!
#48
Posted 17 April 2006, 09:35
Hi everyone,
I guess the topic says it all. I would like to access the normal $content STS "placeholder" variable from within PHP. Having browsed thru the documentation and the osCommerce forum, I really can't find anything that helps me out.
Basically, what I'm trying to achieve is to find the PHP-variable STS uses to store the $content placeholder inside.
I'd very much appreciate any help!
Kind regards,
Peter
#49
Posted 17 April 2006, 09:50
MrsPhim, on Apr 17 2006, 02:40 AM, said:
When installing STS 4.1, my problem was that I had removed my /catalog subdirectory altogether. I think I installed everything correctly, changed all of the necessary files correctly, but since I don't have the /catalog subdirectory, I think the admin/modules.php file messed me up.
Can I just make some changes to the script so that wherever it says where the modules are, I am directing it to the right place....(instead of "$module_directory = DIR_FS_CATALOG_MODULES . 'sts/';" it should say...?) Or am I just completely confused? I read in the Install Readme file about what to do if you renamed your /catalog subdirectory to "shop" or "store" but I think I need a clearer walkthrough....help please?? Thanks a lot!!
Now you need to follow the "CONFIGURATION" instructions that were included with the contribution. For the simplist form of template system, meaning only one template to cover all your pages in your store, just install the "DEFAULT" module. Do this by logging into your "ADMIN" section of your store, click on "MODULES", then select "STS", select "DEFAULT", and then select "INSTALL". Follow the instructions for setting up the "DEFAULT" module that were included with the contribution.
Good luck,
Bill Kellum
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#50
Posted 17 April 2006, 09:58
Pex, on Apr 17 2006, 03:35 AM, said:
Hi everyone,
I guess the topic says it all. I would like to access the normal $content STS "placeholder" variable from within PHP. Having browsed thru the documentation and the osCommerce forum, I really can't find anything that helps me out.
Basically, what I'm trying to achieve is to find the PHP-variable STS uses to store the $content placeholder inside.
I'd very much appreciate any help!
Kind regards,
Peter
Let us know more info if this does not help you out.
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
#51
Posted 17 April 2006, 10:19
kokus, on Apr 15 2006, 06:16 PM, said:
any ideas?
My Store Project
If so, you may have accidentally added a space, possibly at the end of the file that is causing your footer not to display correctly. Make any corrections to the above page if you have made any changes in the past. Try looking at line 17 of the code on your sts_footer.php page.
Let me know if this helps,
Bill Kellum
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#52
Posted 17 April 2006, 10:20
bkellum, on Apr 17 2006, 11:58 AM, said:
thank you for replying - your devotion to STS (and its users) is really amazing.
The idea is to place the following "pseudo code" in my default sts_template.html file:
<?php echo($stsvariable->content); ?>
Initially, it is only for testing purposes. In the long run, however, I'm trying to create an efficient system that consists of as few template files as possible to maintain. As my shop won't be using dynamically created category links (but rather use png-images linked to fixed "cPath="-URL:s), my idea is to have every single template file call a "global" PHP-function that creates the entire shop. Again, using "pseudo code":
<?php
// this is one of the template files
include "createShopHTML.php"; // contains createShopHTML() function used below
$categories[0] = createStaticURL("action_games.png");
$categories[1] = createStaticURL("flight_simulators.png");
$categories[2] = createStaticURL("puzzle_games.png");
createShopHTML($categories); // pass the category array to the createShopHTML-function and create the entire page
?>
The createShopHTML() function would then access the STS $content placeholder, creating the actual page. I'm hoping this makes sense to you
Regards,
Peter
#53
Posted 17 April 2006, 10:22
Frisser, on Apr 15 2006, 11:20 AM, said:
Let me know,
Bill Kellum
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#54
Posted 17 April 2006, 10:36
scottmason, on Apr 13 2006, 07:04 AM, said:
what are the FULL and TEST folders for?
To use STS v4.1 in it's most simplist form, meaning using only one template for all of your pages in your store, you would set your admin panel to point to the one template in the "test" folder.
To use STS v4.1 in a more complex scenario, meaning that you control what template to use for specific pages such as your account.php page, shipping.php page, index.php page and so on, you would set your admin panel to point to the several templates in the "full" folder.
Try using the test folder first and get STS v4.1 up and running with no errors. Then customize your shop even further by changing over to the templates in the "full" folder. You can add more templates to the "full" folder by adding the name of the php page along with the html extention.
I 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
#55
Posted 17 April 2006, 11:43
With me the Metadaten of the product info are not indicated correctly, there is no product name and the product description.
I have installed the following modules:
Header Tags Controller v2.5.7 Complete
STS v4.1
Module for Header Tags Controller
I think that the mistake in the lines general.php lines.
$sts->template['headertags']= "<title>" . TITLE . "</title>"."\n"; // ORIGINAL LINE $sts->template['headertags'] = $sts->template['headertags'] . '<meta name="description" content="'. TITLE .'">'."\n"; //LINE I ADDED $sts->template['headertags'] = $sts->template['headertags'] . '<meta name="keywords" content="'. TITLE .'">'."\n"; //LINE I ADDED
#56
Posted 17 April 2006, 14:57
I've got STS installed and its working fine. I'm developing a unique design for my store. How do you change the way an item such as $categorybox (Categories, show on the left side in the default template) is displayed? Do you recommend changing the categories.php or the stylesheet.css file? Or something else entirely?
thanks,
Scott
#57
Posted 17 April 2006, 16:07
twitchylegs, on Apr 17 2006, 08:57 AM, said:
I've got STS installed and its working fine. I'm developing a unique design for my store. How do you change the way an item such as $categorybox (Categories, show on the left side in the default template) is displayed? Do you recommend changing the categories.php or the stylesheet.css file? Or something else entirely?
thanks,
Scott
Otherwise, the listings are controlled by the names of the catagories that you have enabled within the oscommerce admin panel.
Hope this helps,
Bill Kellum
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#58
Posted 17 April 2006, 17:31
bkellum, on Apr 17 2006, 06:19 AM, said:
If so, you may have accidentally added a space, possibly at the end of the file that is causing your footer not to display correctly. Make any corrections to the above page if you have made any changes in the past. Try looking at line 17 of the code on your sts_footer.php page.
Let me know if this helps,
Bill Kellum
Bill:
Thanks for the response. I have the file at http://www.graffodesign.com/catalog/includ.../sts_footer.php
I have checked everything and I don't see any problem. If you click in the above url. I get an error in line 17.
Warning: main(DIR_WS_INCLUDEScounter.php): failed to open stream: No such file or directory in C:\Inetpub\vhosts\graffodesign.com\httpdocs\catalog\includes\modules\sts_inc\sts_footer.php on line 17
Fatal error: main(): Failed opening required 'DIR_WS_INCLUDEScounter.php' (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\graffodesign.com\httpdocs\catalog\includes\modules\sts_inc\sts_footer.php on line 17
Do you see anything wrong on my code?. This is my sts_footer.php:
<?php
/*
$Id: sts_footer.php,v 4.1 2005/02/10 22:30:54 rigadin Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2005 osCommerce
Released under the GNU General Public License
Based on: Simple Template System (STS) - Copyright (c) 2004 Brian Gallagher - brian@diamondsea.com
STS v4.1 by Rigadin (rigadin@osc-help.net)
*/
// Get the number of requests
require(DIR_WS_INCLUDES . 'counter.php'); [color=#FF0000]//LINE 17[/color]
$sts->template['numrequests'] = $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted;
/*
The following copyright announcement can only be
appropriately modified or removed if the layout of
the site theme has been modified to distinguish
itself from the default osCommerce-copyrighted
theme.
For more information please read the following
Frequently Asked Questions entry on the osCommerce
support site:
http://www.oscommerce.com/community.php/faq,26/q,50
Please leave this comment intact together with the
following copyright announcement.
*/
$sts->template['footer_text']= FOOTER_TEXT_BODY;
// Get the banner if any
$sts->start_capture();
if ($banner = tep_banner_exists('dynamic', '468x50')) {
echo tep_display_banner('static', $banner);
}
$sts->stop_capture ('banner_only');
require (DIR_WS_MODULES . 'sts_inc/sts_display_output.php'); // Print everything out
?>
thanks in advance. I am new in PHP. Maybe I missed something in the code above.
kokus
Edited by kokus, 17 April 2006, 17:35.
#59
Posted 18 April 2006, 13:04
I'm fairly new to osCommerce so jumped at the change to make editing of templates easier. I've downloaded STS 4.1 as well as the updates (dated 12th and 14th April) and uploaded these new files to my site, but though I'm getting the STS menu option in my admin/modules, it shows the same list as for 'Payment Modules'. That is, I'm not seeing any opportunity to actually enable 'default' and get started.
Am I missing something obvious?! Thanks so much
Mike
#60
Posted 18 April 2006, 21:11
OK I know i could start my HTC install all over from scratch, but it takes too dang long to find and replace code for the admin files. So I thought i would just try and ask if anyone has insights into the following error:
Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php:33) in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php on line 33
thanxs














