Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sts Mega Power Pack


mig7

Recommended Posts

hi all,

 

i installed the STS mega power pack and got some problems. the dynamenu doesnt work well and the subcategory appears at the bottom of the page. whats wrong with that? anyone can help? really appreciate it..

 

thanks.

Link to comment
Share on other sites

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

hi all,

 

i installed the STS mega power pack and got some problems. the dynamenu doesnt work well and the subcategory appears at the bottom of the page. whats wrong with that? anyone can help? really appreciate it..

 

thanks.

 

geepers!

 

what other contribs do you have? walk us through what you did.

 

did you get the update file too? some code was missing but dynamenu should be fine, it is here but this aint your computer so not too helpfull.

 

Dynamenu comes as packed from that contribution, all i have done is integrate it as the instructions suggest. bkellum's instructions to get sts working with dynamenu found at sts power pack contrib page may help as i have only taken one of the suggested roots here. ie echo footer in application bottom.

 

Oh! have you put the sts variable somewhere on your page, it looks something like $dmbox. it could be that you do not have this and the application bottom code is the only piece being processed.

 

tell us a little more about your install and what else you have and perhaps we can work it out.

 

matt

Link to comment
Share on other sites

DISCOVERED: PROBLEM WITH ADMIN ADD NEW CATAGORIES BUTTON.

 

this may or may not have anything to do with the contributions installed because everything on the development server works fine as opposed to the live shop remote server. it is similar to the problems with the multi bundle. ie there was missing code in the general.php file (from memory) which was for the good working of htc.

 

I will back track some to find the problem. let me know here if this is found by anyone else.

 

matt.

Link to comment
Share on other sites

If you have the sts external pages templates - setup instructions/contribution from:

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

 

you will remember an addition to functions/html_output.php which uses an ifelse test for location of the file in the root directory of the server or in the catalog directory.

 

as promised here is the update that should allow you to use sts with any file in any directory

--- as long as you make sure to adapt the includes/requires to application top in each file.

 

hopefully you should see waht i am trying to do here. you may need to play a little with this!

 

/**********************************************************

*** mjr addition for external sts templated pages ***

**********************************************************/

 

// Full path to file should be defined before the file name in filenames.php

// beginning with a forward slash.

//

// External file paths and names must be defined in filenames.php so that osc pages

// can use the variables too.

//

// e.g.

// define('FILENAME_CONTACT', '/about_us/jobs/contact.php' );

 

//

// connection parameters as set in sts_user_code.php:

//

// ext = external file outside osc

// sslext

// nonssl

// ssl

//

// if connection == ext { // for normal unsecured external pages

// }elseif connection == sslext { // for external pages needing ssl cover

// }elseif connection == nonssl { // for normal unsecured osc pages

// }elseif connection == ssl { // for osc pages needing ssl

// }

 

/**********************************************************/

 

//NEW --------------------------------------------------------------

 

if ($connection == 'EXT') {

 

$link = HTTP_SERVER; // get the rest of the path from filenames.php

 

}elseif ($connection == 'SSLEXT') {

 

if (ENABLE_SSL == true) {

 

$link = HTTPS_SERVER;

 

} else {

 

$link = HTTP_SERVER;

 

}

 

//ORIGINAL --------------------------------------------------------

 

}elseif ($connection == 'NONSSL') {

 

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

 

} elseif ($connection == 'SSL') {

 

if (ENABLE_SSL == true) {

 

$link = HTTPS_SERVER . DIR_WS_HTTP_CATALOG;

 

} else {

 

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

 

}

 

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font>

<br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');

}

 

/**********************************************************/

Link to comment
Share on other sites

your sts_user_code.php page links should look like

 

$sts->template['Home'] = '<a href=' . tep_href_link(FILENAME_HOME, '', 'EXT') . ' class="headerNavigation">' . 'Home' . '</a>';

 

for home.php in root defined as:

 

define('FILENAME_HOME', '/Home.php' );

Edited by MatthewRitchie
Link to comment
Share on other sites

correction, '/home.php' in define breaks it so do:

 

if ($connection == 'EXT') {

 

$link = HTTP_SERVER . '/';

 

}elseif ($connection == 'SSLEXT') {

 

if (ENABLE_SSL == true) {

 

$link = HTTPS_SERVER . '/';

 

} else {

 

$link = HTTP_SERVER . '/';

 

}

 

note the . '/' additions

Edited by MatthewRitchie
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

I would first like to say thanks for this very interesting contribution. I am building a site for my distribution company and I am confused where to find the path for includes/functions/html_output.php in filenames.php. I know this is probably simple but the help is greatly appreciated

Link to comment
Share on other sites

what i normally do is to splash as many <?php echo 'stuff'; ?> commands throughout the code i am trying to adapt so that i can visually see want the code is or is-not building.

 

NOTE: THE QUESTION ABOVE RELATES TO STS EXTERNAL PAGES TEMPLATES.

 

the path for includes/functions/html_output.php in filenames.php - incorrect. the paths are built from varaibles created in configure.php when links are built in the php engine and outputted to the screen. the function used is tep_href_ bla bla bla at the top of the file html_output.php. the trick is to put into this function other if else loops so that you get the desired html href results.

 

since sts builds new page links from your programming input in sts_user_code.php i have created two more parameters to pass to the tep_href function. these tell the function to do something different when building page links if your pages are outside the catalog folder and if they too need to be handled specially for ssl.

 

I myself here, need a little revision of what i have done so far as the new harry potter book and familly visites have distracted me for a while.

after doing so i hope to have a revised bundle ready for you all.

 

this will be:

 

reg globals

sts

htc

new dynamenu - dynamenu gone nuts bonkers - multiple dropdowns, flyouts, trees etc all on the same page......

sts external pages templates

thats it for now...

 

problems that need solved:

 

new dynamenu - session ids need to be built into multi-dynamenu links

and all the other menu layout options still need to be added!

 

sts external pages templates - currently: in every new folder you make for new pages, you need to copy and paste a local sts 'templates' folder. i need to reprogram classes sts.php so that you can choose between having one local templates folder in each new folder, or only two sts templates folders, one in root for every external file and one in catalog/ for the shop files only. i think this can be done but i will be removing the choice in the module setup in admin. perhaps.

 

by the way. all external template default files containg a switching code that alows the one single default template in catalog/templates to be used. the switch is currently situated in configure.php. turn 'on' or 'off'.

 

as you can see i have given myself a lot of extra work so please be patient. ;o)

 

spread the love - especially to iraq. by them all the harry potter series and they will fixed up for a few weeks without bombs and bullets flying around.

 

 

matt

Link to comment
Share on other sites

  • 2 weeks later...

New sts mega power pack bundle comming your way tomorrow monday,13 aug 2007. very simple setup! whats in it:

 

register globals

sts

htc

multiple flyouts/dropdowns/treemenus/plainmenus - dynamenu

sts external pages templates

 

now comes with straight forward - zero manual editing - installation build of configuration file.

 

every page in each unique external folder is customizable with main page template files and boxes templates

the above feature can be switched off via config to use only one template for everything.

 

remaining problems

 

dynamenu additional menu links are not built with tep_href() osc function so are not compliant with sessions. however sts_user_code are compliant with sessions. external pages keep sessions info.

 

bla bla bla etc etc more to do!

 

i reitterate! very very very simple setup!

 

matthew john ritchie

Link to comment
Share on other sites

New sts mega power pack bundle comming your way tomorrow monday,13 aug 2007. very simple setup! whats in it:

 

register globals

sts

htc

multiple flyouts/dropdowns/treemenus/plainmenus - dynamenu

sts external pages templates

 

now comes with straight forward - zero manual editing - installation build of configuration file.

 

every page in each unique external folder is customizable with main page template files and boxes templates

the above feature can be switched off via config to use only one template for everything.

 

remaining problems

 

dynamenu additional menu links are not built with tep_href() osc function so are not compliant with sessions. however sts_user_code are compliant with sessions. external pages keep sessions info.

 

bla bla bla etc etc more to do!

 

i reitterate! very very very simple setup!

 

matthew john ritchie

Matthew, you may want to consider removing the Register Global contribution from your Mega Pack since new users who have the latest osCommerce installed will not need it.

 

http://www.oscommerce.com/forums/index.php?s=&...t&p=1110788

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

Thanks for the Heads Up Bill, I had not heard of the new version till now. As a backup to this, I will likely devote a special page to oscommerce on my site. this will go nicely with a humungus list of open source programs i have to edit and post. I shall keep a copy of each of the downloads as they come out and hopefully i will be able to redo some of the work here for new versions. however it goes those past versions of osc will continue to be arround untill time dictates that the problems have been sufficiently ironed out. I am personallly still on the quest of a superdooper ERP cart system but am just to lazy at the moment to go and learn JAVA so i can use the Apache Foundations Cart and Erp system called OPEN FOR BUSINESS. OFBIZ.

Link to comment
Share on other sites

STS_M_P_P_V2 MatthewRitchie 14 Aug 2007

 

THE ZIP FILE IS TOO BIG FOR UPLOAD TO OSC BUT YOU CAN GET IT HERE:

 

STS_M_P_P_V2.zip

 

Contribution Contents:

 

(1) Register Globals --- VV 1.5

 

(2) STSv4.5.2

(3) and HTCv2.6.3 Bundle

 

(4) DYNAMENU_GONE_NUTS_BONKERS

 

(5) Sts_External_Pages_Templates

 

FULLY WORKING EASY INSTALL.

 

THE INSTRUCTIONS FOR INSTALL AND USE ARE ON OSC HERE:

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

Link to comment
Share on other sites

Matthew,

 

After going trought most of the steps to install this new contribution I get the following error once I turn on STS.

 

LayersMenu Error: setImgdir: /Program Files/Apache Group/Apache2/htdocs/shop/images/ is not a directory

 

My paths all seem correct in configure.php, and dm_header.php, any input would be appreciated

Link to comment
Share on other sites

Matthew,

 

After going trought most of the steps to install this new contribution I get the following error once I turn on STS.

 

LayersMenu Error: setImgdir: /Program Files/Apache Group/Apache2/htdocs/shop/images/ is not a directory

 

My paths all seem correct in configure.php, and dm_header.php, any input would be appreciated

 

I assume your catalog folder is called 'shop' and you are using oscommerce ms 2.2ms2-060817.

 

normally when this happens all you need to do is tweek the defined DM_SETDIRROOT or the other variables, say images directory or DIR_WS_HTTP_CATALOG in the configure.php. Often this is caused by a missing forward slahs or a typo.

 

first make sure the images folder exists. this shouldnt have come up as the configure file should be written correctly through install.

 

put in the c: before the first forward slash in config and see what happens.

 

your config should look something like this:

 

/* --------------------------------------------------------------------------------------------------------------------- */

 

define('CATALOG_DIR_NAME', 'catalog'); // The folder in which osc has been installed.

 

/* --------------------------------------------------------------------------------------------------------------------- */

if (dirname($_SERVER['PHP_SELF']) == '/catalog'){

/* --------------------------------------------------------------------------------------------------------------------- */

 

define('DIR_WS_HTTP_CATALOG', '/catalog/' );

define('DIR_WS_HTTPS_CATALOG', '/catalog/' );

 

define('DIR_WS_IMAGES', 'images/' );

define('DIR_WS_INCLUDES', 'includes/' );

 

define('STYLESHEET', 'stylesheet.css' );

define('dmSTYLESHEET', 'bonkers_dynamenu.css' );

 

define('DM_SETDIRROOT', './' );

 

/* --------------------------------------------------------------------------------------------------------------------- */

}else{

/* --------------------------------------------------------------------------------------------------------------------- */

 

define('DIR_WS_HTTP_CATALOG', '/catalog' );

define('DIR_WS_HTTPS_CATALOG', '/catalog' );

 

define('DIR_WS_IMAGES', '/catalog/images/' );

// define('DIR_WS_INCLUDES', 'catalog/includes/' );

 

define('STYLESHEET', 'catalog/stylesheet.css' );

define('dmSTYLESHEET', 'catalog/bonkers_dynamenu.css' );

 

define('DM_SETDIRROOT', 'C:/Program Files/Apache Group/Apache2/htdocs/catalog' );

 

/* --------------------------------------------------------------------------------------------------------------------- */

}// end if-else

/* --------------------------------------------------------------------------------------------------------------------- */

 

define('DM_INCLUDES_FUNCTIONS', 'includes/functions/');

 

 

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

 

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

 

define('HTTP_COOKIE_DOMAIN', 'localhost');

define('HTTPS_COOKIE_DOMAIN', '');

 

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '');

 

// define('DIR_WS_HTTP_CATALOG', '/catalog/');

// define('DIR_WS_HTTPS_CATALOG', '');

 

// define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

 

// define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', 'C:/Program Files/Apache Group/Apache2/htdocs/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Link to comment
Share on other sites

!!!!!!!!!!!!!! ah, could be this, ... i didnt remember this in the build...

 

top of boxes/dm_header.php

 

// allow subcatagories to flyout or dropdown.

 

$show_full_tree = true;

 

// set paths

 

$myDirPath = '/Program Files/Apache Group/Apache2/htdocs/';

 

 

set the above path only, correct to your system!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

also:

 

$mid->setImgdir($myDirPath . 'shop/images/');

$mid->setImgwww($myWwwPath . 'shop/images/');

 

$mid->setIcondir($myDirPath . 'shop/images/');

$mid->setIconwww($myWwwPath . 'shop/images/');

 

change relating paths. ie replace shop with your catalog folder name..... use CATALOG_DIR_NAME defined variable

 

I over looked this, thus it is still set to my system. lol

Edited by MatthewRitchie
Link to comment
Share on other sites

Many thank for the input. I re-started from scratch just to be sure I installed correctly, and both times I installed the first time you view the catalog you receive the following warnings.

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /catalog/includes/configure.php:151) in /catalog/includes/functions/sessions.php on line 98

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /catalog/includes/configure.php:151)in /catalog/includes/functions/sessions.php on line 98

 

Just delete the white spaces at the end of configure.php to get rid of them.

 

Hope this makes someone's life a little easier.

Link to comment
Share on other sites

Many thank for the input. I re-started from scratch just to be sure I installed correctly, and both times I installed the first time you view the catalog you receive the following warnings.

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /catalog/includes/configure.php:151) in /catalog/includes/functions/sessions.php on line 98

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /catalog/includes/configure.php:151)in /catalog/includes/functions/sessions.php on line 98

 

Just delete the white spaces at the end of configure.php to get rid of them.

 

Hope this makes someone's life a little easier.

 

Hi Joshua

 

Thanks for that. never had the problem myself. just wondering if you were using the same database or made a new db each time. i have had similar warnings when trying to repopulate /rebuild an already existing db or when i redo the database_setup.php. because this info already exists the php engine doesnt like it too much.

 

matt

Link to comment
Share on other sites

change relating paths. ie replace shop with your catalog folder name..... use CATALOG_DIR_NAME defined variable

 

CATALOG_DIR_NAME: this may need the inclusion of configure.php in the dm_header.php file eventhough config is included later in the donor file read by sts to populate the template.

Link to comment
Share on other sites

Hi Joshua

 

Thanks for that. never had the problem myself. just wondering if you were using the same database or made a new db each time. i have had similar warnings when trying to repopulate /rebuild an already existing db or when i redo the database_setup.php. because this info already exists the php engine doesnt like it too much.

 

matt

 

looks like I was re-populating, lol I will try this again

Link to comment
Share on other sites

Hi Joshua

 

Thanks for that. never had the problem myself. just wondering if you were using the same database or made a new db each time. i have had similar warnings when trying to repopulate /rebuild an already existing db or when i redo the database_setup.php. because this info already exists the php engine doesnt like it too much.

 

matt

hi matt, great contribution.

 

i have spent the day installing it on RC1 as that is what was available on the oscommerce site and i had already made many mods and was reluctant to take my site back to ground zero i wish someone would build a top ten list of mods to make before any others... probably would become pretty political. anyway, it can become a bit of a house of cards when one's knowledge is limited to just enough to break things.

 

i too am having these errors and removing white spaces ( a suggestion i found from way back too) did not work for me. i am not sure i can re-do the database given that i have made mods already. however, if you are really sure about that approach, i will restore the original...

 

i manually installed the powerpack and excluded the globals as i was concerned about conflicts given that this is RC1.

 

any thoughts on what i should do at this point would be appreciated. thanks.

Link to comment
Share on other sites

hi matt, great contribution.

 

i have spent the day installing it on RC1 as that is what was available on the oscommerce site and i had already made many mods and was reluctant to take my site back to ground zero i wish someone would build a top ten list of mods to make before any others... probably would become pretty political. anyway, it can become a bit of a house of cards when one's knowledge is limited to just enough to break things.

 

i too am having these errors and removing white spaces ( a suggestion i found from way back too) did not work for me. i am not sure i can re-do the database given that i have made mods already. however, if you are really sure about that approach, i will restore the original...

 

i manually installed the powerpack and excluded the globals as i was concerned about conflicts given that this is RC1.

 

any thoughts on what i should do at this point would be appreciated. thanks.

 

 

OK mea culpa. thought to remove spaces before final line, not after. FIXED! so please never mind that first posting of mine.

 

however, i do get the following error on the index page:

 

Template file does not exist: [templates/sts_template.html;headertags.php]

 

this error goes away when i change the Default template file under the STS Modules, Default from:

 

sts_template.html;headertags.php

 

back to:

 

sts_template.html

 

i can live wth this but i think i will be missing some effectiveness of the HTC contribution.

did i misunderstand your installation instructions? as mentioned earlier, i tried to skip the gobal issues as i do have the later release of OScommerce.

 

thanks for any help you can provide.

Link to comment
Share on other sites

OK mea culpa. thought to remove spaces before final line, not after. FIXED! so please never mind that first posting of mine.

 

however, i do get the following error on the index page:

 

Template file does not exist: [templates/sts_template.html;headertags.php]

 

this error goes away when i change the Default template file under the STS Modules, Default from:

 

sts_template.html;headertags.php

 

back to:

 

sts_template.html

 

i can live wth this but i think i will be missing some effectiveness of the HTC contribution.

did i misunderstand your installation instructions? as mentioned earlier, i tried to skip the gobal issues as i do have the later release of OScommerce.

 

thanks for any help you can provide.

 

default setup:

 

just incase i mistyped or copied something accross here is what it should be:

 

Files for normal template

Files to include for a normal template, separated by semicolon

 

sts_user_code.php;headertags.php

 

what i think you have done is:

 

Default template file

Name of the default template file

 

sts_template.html;headertags.php

 

headertags.php is a file to be included the same way as sts_user_code whereas sts_template.html is the actual template file that you edit depending upon you particular layout/design/style etc

 

i believe that if you check this and admend you will have things working properly including htc

 

matt

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