Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MatthewRitchie

Pioneers
  • Posts

    167
  • Joined

  • Last visited

Everything posted by MatthewRitchie

  1. Been away for a while playing with google.
  2. Hi Del I am quite sure you can use dynamenu without sts as this is how the dynm. contrib was first proposed. You might already have found the support pages by now. anyway, dynamenu is built using "PHP Layers Menu" which is easily searched for. There are full instructions on its use hence how I managed to adapt it to my needs. May i suggest you start there as it is fairly easy once you have read through the instructions. Matt
  3. <a href="http://localhost/catalog/index.php?osCsid=075cb8c189d4199bcf4c097b3e0f4be9?cPath=32">Kitchen</a>'>http://localhost/catalog/index.php?osCsid=075cb8c189d4199bcf4c097b3e0f4be9?cPath=32">Kitchen</a> If you break the link down into its parts you get this: <a href="http://localhost/catalog/index.php ?osCsid=075cb8c189d4199bcf4c097b3e0f4be9 ?cPath=32">Kitchen</a> see at the beginning of the above two lines, the '?' signifies a $_GET array query string ammended to the href target file now, query strings should be made up of only one '?' and then any further additions to the string are attached with an '&' ampersand. this is as far as I can help without your web adress so I can see what may be happening. from what i gather, you have the catagories reitterated in the horizontal navigation menu. The 'Dynamenu_gone_nuts_bonkers was written for the catagories to remain in a vertical flyout menu down the left hand side of the page. this is the overwhelming tradition of ecommerce shops. if you want to put catagories across the top of the page in the £dm_horiz then you will need to take a look in includes/boxes/dm_header.php and wiggle the code for you needs. note, you may have problems with having two category links tables on the same page, perhaps not though, ive not tested it. Oh and you can hard code your category links like I have done in the above file too, but remember to leave out the sessions id, all you need is the cpath=xx where xx is the category number. to hard code you need tep_href(), copy it from some other file. this function allows the sessions to follow a visitor arround the site and hence is very important. hope that helps a little matt
  4. this problem seems very similar to the one above in this topic link: http://www.oscommerce.com/forums/index.php?s=&...t&p=1147688 have you checked your configure.php file?
  5. The STS and Htc combo i have used to build this mega power pack is from bill's sts power pack. I have left most of it untouched apart from adding in register globals (not now needed with osc RC1), dynamenu and sts external template pages. matt
  6. WORKAROUND SOLUTION: i didnt find a solution for keeping the session id in the address bar [i know this has its security issues with it] but has resolved to forcing cookie usage through admin=>configuration=>sessions. all seems to work fine when in this state. matt demo (but live product shop at - see signature) will shortly have the dm_header.php empty catagories installed [give me five minutes] ;o)
  7. slight problem with the above additions to dynamenu, sessions sharing between osc and external pages breaks once you leave osc to browse over the external pages, this did not happen previously but i did notice that hitting the 'top' link in the breadcrums did reset the session to another id. the problem with this is that once a visitor has inputed products into their cart, they are not retained when comming back to the cart. it seems it is only a problem when testing on the remote live server and has no effect on the localhost server even though everything is exactly the same. perhaps the way forward is to use cookies....? a problem once solved returns yet again! as homer simpson says !!!!!DOH!!!!!! matt just reverted to the old files but no change so there is a problem else where that i need to find.... just so you know, and perhaps you can provide a possible solution
  8. Hi again - another cool tip for dynamenu have you got loads of catagories in your menu that do not have products in them yet? why show them? I found a contrib called 'empty catagories' but this only works for the stock osc boxes/catagories.php that displays the simple list, have a look: http://www.oscommerce.com/community/contributions,5270 any way, ive now adapted it to work with dynamenu gone nuts bonkers, here goes: do the edits below to the file boxes/dm_header.php they are the edits clearly shown surrounded with 'shift8' stars.
  9. Work-around for BonkersDynamenu When Install is finished and you go to view the catalog, you will likely get this: LayersMenu Error: setImgdir: /Program Files/Apache Group/Apache2/htdocs/shop/images/ is not a directory. Halted. it will only work if your catalog folder is called 'shop', however... with a little editing to catalog/includes/boxes/dm_header and dm_treemenu you can use configured variables in place of the existing hard coded path values. heres how: open catalog/includes/configure.php and insert this (p.s. amend to your server path as apropriate) define('DM_MYDIRPATH', '/Program Files/Apache Group/Apache2/htdocs/'); under this: define('DM_INCLUDES_FUNCTIONS', 'includes/functions/'); like so: define('DM_INCLUDES_FUNCTIONS', 'includes/functions/'); define('DM_MYDIRPATH', '/Program Files/Apache Group/Apache2/htdocs/'); NOTE: WINDOWS PATHS MUST START WITH '/' NOT 'C:/' BECAUSE PHPLAYERSMENU AKA DYNAMENU WILL NOT ACCEPT THE 'C:' PART. STRANGE QUIRK - DONT ASK! now in the boxes/dm_ files mentioned above amend to the following: // set paths $myDirPath = DM_MYDIRPATH; $myWwwPath = '/'; note: remove single quotes around the defined variable DM_MYDIRPATH now scroll down to: $mid->setImgdir($myDirPath . 'shop/images/'); $mid->setImgwww($myWwwPath . 'shop/images/'); $mid->setIcondir($myDirPath . 'shop/images/'); $mid->setIconwww($myWwwPath . 'shop/images/'); change to this: $mid->setImgdir($myDirPath . CATALOG_DIR_NAME . '/images/'); $mid->setImgwww($myWwwPath . CATALOG_DIR_NAME . '/images/'); $mid->setIcondir($myDirPath . CATALOG_DIR_NAME . '/images/'); $mid->setIconwww($myWwwPath . CATALOG_DIR_NAME . '/images/'); this will sort out that problem. ;o) i will make amends to the install_step7 file soon.... external template files will still need manual editing though.
  10. I would like to take this opportunity to elabourate some on the workings of my contribs here.... especially sts_external_template_pages. The majority of my contribs use the config file extensively in this way as you say, however the external template pages need to call the configure.php via applicationtop.php directly before they can use the contained defined variables. i.e. for templates to work externally to the catalog folder the files must call applicationtop via an inclued or require statement. at present there is no function in the install process that will write these path variables because firstly i have only supplied very basic external files for de'monster'ation and secondly i have only gone one folder deep but when new folders goind three/four deep, each new folder will need a local template folder like the sts ones i have provided, as well as an osc layout file. ]the layout file is in which someone would build there ''new page'' acording to the body text areas as done in osc.] in each layout file 'newpage' one would need to edit the path to applicationtop.php found in osc/cat/includes. example: considder the file www[root]/company/about_us.php note my catalog folder is called 'shop' define('DIR_WS_INCLUDES', '../shop/includes/' );------------just predefines where to find the includes folder - it is here because there is no facility for pointing to varying degrees of folder depth outside catalog [this is done ok for www[root] in configure.php - see the if else statement but things get complicated from one folder deep onwards.....] define('STYLESHEET', '../shop/stylesheet.css' );--------not really needed because is done in sts_template.html - redundant? include('../shop/includes/application_top.php'); ----- important for templates to work externally to osc catalog folder, the '../' points to the parent directory i.e. www[root] require('lang_en_About_Us.php'); --------- language file for new external pages is in the same folder --- these are only necessary for defined variables such as HEADING_TITLE and TEXT_INFORMATION but these could be illiminated altogether if desired. p.s. i had problems trying to use the osc includes/languages folder using config defined path variables but it should be an easy work around if desired. $breadcrumb->add(NAVBAR_TITLE, tep_href_link('../'.FILENAME_ABOUT_US)); --- see includes/filenames.php for filename structure - i.e. putting partial paths infront of the file name so that the breadcrum links work correctly. also note the '../' pointing to www[root] as viewed from the catalog folder. apart from the above the layout file is the same as a standard osc file - you need to keep things like: <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> and <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> and <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> so that all the boxes etc work externally to osc. i experimented a lot! with reducing the files down as much as possible but things started to go very wrong when i removed too much. your file content must go between the following tags: <!-- body_text //--> <!-- body_text_eof //--> this is so that sts can pick up the correct pieces and regurgitate them correctly. within the above body text comment tags, sts will chop out everything before the '<table' and after '</table>' so you need atleast one table written into the content script, which is not a problem because it is osc standard practice. finally you still need <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> at the very bottom so that dynamenu etc works flawlessly. ONE MINOR POINT --- <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> YOUR WARNINGS FOR SAY THE INSTALL FOLDER STILL PRESENT AND CONFIG.PHP NOT SET WITH CORRECT PERMISSIONS WILL NOT SHOW ON EXTERNAL PAGES - I DONT KNOW WHY! i tried removing the above because i thought it as redundant but things cocked up again! still dont ask! please ;o) below is the full file for reference.......... matt
  11. Hi again, Yup, found the problem to the above warning message. I dont know why it should matter but you will see when you make the edits. open [catalog]shop/includes/configure.php scroll down to the very bottom and you will see extra line spaces below the closing '?>'. delete these and the problem will vanish into the eather. weird ey! i think this has been mentioned before in this thread but here it is again just in case. p.s. i built this contrib with all osc catalog files in a folder called 'shop' hence you will get errors in the external files such as index.php, Home.php and also files in the Company folder. you may get around this the easy way by doing the same, i.e. put your osc catalog files in a folder called 'shop' or you may open the external files and edit in you catalog folder name. this is also the case for the dynamenu files as i have mentioned above but reitterated here again too. dm_header and dm_treemenu in the includes/boxes folder two changes needed (1) change $myDirPath = '/home/****/public_html/'; to your directory path, it may look like this for microsoft servers: $myDirPath = '/Program Files/Apache Group/Apache2/htdocs/'; (2) change 'shop' in $mid->setImgdir($myDirPath . 'shop/images/'); $mid->setImgwww($myWwwPath . 'shop/images/'); $mid->setIcondir($myDirPath . 'shop/images/'); $mid->setIconwww($myWwwPath . 'shop/images/'); to your catalog folder name. if you need to restart an install be sure to replace catalog/admin/includes/configure.php and catalog/includes/configure.php with the installation files respectively, this allows the first install screen to open rather than going back to the catalog shop front index.php. hope these tips help matt
  12. Hi kenji815 i am back at it again here. i have just been doing a new site rebuild and what a nightmare working on the remote server.!#? I have com across the same problem as you have above and will try to resolve it and bring you an answer. so far i think it may be to do with how or more to the point when the database_setup.php is done for headertags. i will try a couple of different techniques and see what i can come up with. matt
  13. i may be wrong but.... This is saying that there is a descrepancy in the functioning of a function, probably because a defined variable which you will find the the file configure.php does not relate correctly to the variable call in a function located in the sessions.php. you may want to open the two files and see what resides on these two lines mentioned. it seems that the problem is to do with the addin header tags contribution. unfortunately I am not well self taught on this contribution yet. but look for code relating to header tags. depending on which contribution pack you have down loaded (you may have a much older contrib) the problem may have been resolved already. or there may be an answer under the header tags contrib threads. let me know what the file name is so i can pin down the problem better. matt
  14. does it sometimes seem like i am typing this to myself? hello where is everybody ;o) feel free to simply say hi to let me know this is of help to you. cheers matt
  15. Dynamenu external pages links are now covered by the session! here is the trick: this is the code that creates your sessions compliant links: . tep_href_link(FILENAME_DOWNLOADS, '', 'EXT') . tip: you can copy and paste the above from includes/modules/sts_inc/sts_user_code.php hence it needs to be used with-in the code/.txt that builds the navigation layers in dynamenu; reminder - they look like this at the moment: .|Home|http://bluegreentechnologies.com/index.php|Home .|Company|http://bluegreentechnologies.com/Home.php|About Us ..|About Us|http://bluegreentechnologies.com/Company/About_Us.php|About Us ..|Contact Us|http://bluegreentechnologies.com/Company/contact.php|Contact Us ..|Technical Info|http://bluegreentechnologies.com/Company/Technical_Info.php|Technical Info ..|Downloads|http://bluegreentechnologies.com/Company/Downloads.php|Downloads but adding tep href to layersmenu-horizontal-1.txt doesnt work because it is not a php file. i did try with changing it to .php and doing the recode but it was not liked! however you can do this: goto ---> boxes/dm_header.php change this // $mid->setMenuStructureFile(DIR_WS_FUNCTIONS . 'dynamenu/layersmenu-horizontal-1.txt.php'); to this: $navmenu = ".|Index|" . tep_href_link(FILENAME_HOME_INDEX, '', 'EXT') . "|Index\n". ".|Home|" . tep_href_link(FILENAME_HOME, '', 'EXT') . "|Home\n". ".|Company|" . tep_href_link(FILENAME_ABOUT_US, '', 'EXT') . "|About Us\n". "..|About Us|" . tep_href_link(FILENAME_ABOUT_US, '', 'EXT') . "|About Us\n". "..|Contact Us|" . tep_href_link(FILENAME_CONTACT, '', 'EXT') . "|Contact Us\n". "..|Technical Info|" . tep_href_link(FILENAME_TECH_INFO, '', 'EXT') . "|Technical Info\n". "..|Downloads|" . tep_href_link(FILENAME_DOWNLOADS, '', 'EXT') . "|Downloads\n"; $mid->setMenuStructureString($navmenu); and all your links will be sessions compliant! a neet trick ;o) matt
  16. yup! forgot to mention it but is easilly ammended in filenames.php - from memory i believe i put in Home.php. YUP AGAIN just checked: define('FILENAME_HOME', 'Home.php' ); [[[me: ive kept osc deliberately separate because root will soon get very messy with loads of files. by keeping root organised as you would with your my_documents or home/burt folders it makes site planing and "cleanup" much easier]]] path.php is updated during the install process as you can see in install/templates/pages/install_7.php. prior to install it will only serve to allow the configuration file to be read. ie it does exactly what application top does i.e. require(includes/configure.php) after install it should be: define('CATALOG_DIR_NAME', 'catalog'); this is to make sure that your catalog directories name is correctly inserted is the right files to make externatl pages templates work. from what you say above it sounds like you are putting all you catalog folder files into the root folder ie htdocs(apache) for instance. you will therefore have to jiggle all the files relating to external templates to make sure the paths are being created correctly. my suggestions of adding your own debug code will helf extensively. i believe i left some in place in the sts_template.html file. if all files including the osc files are in root you shouldnt need the fixes to html_output.php, application top.php and others that are using the ifelse(is this the catalog folder? yes do){this}otherwise{make your links flow from root} statements that amend the paths appropriately. if you edit these out you should be able to simply use amendments to the filename.php defined filenames so that the these point to the correct folders and files. because you have likely installed into htdocsroot. configure.php has no reference to /catalog/ or /shop/ etc and you dont need to learn how to juggle 'behind my back' like i did. define('CATALOG_DIR_NAME', 'catalog'); is part of the juggling act and you may be able to dispense with it. paths in boxes/dm_header.php need editing relative for root - also image directory/icons etc paths need editing to reflect the relative paths to your catalog/images directory. this should resolve the dm problems. normally flyouts dont work because the dm_footer is not outputed but i have done this at the bottom of application bottom. other methods did not work quite as well. the other reason for flyouts not working is the absolute and relative paths as mentioned in dm_header above.
  17. looke ere --- OSCOMMERCE/STS_M_P_P_V2.zip 155 --- THATS 155 DOWNLOADS OF MY CONTRIB TO DATE COOL! AWSTATS! see it pays to have contribs on your own server! you can see how many people are interested! have fun all.... ;o)
  18. above is harder if your catalog is really really really really really really really really really really really really really BIG! oh and yea - you need to drop the tables first before reloading product info - i think - because it will try to reload over already existing data which may through up loadsa horrid errors. p.s. dont ask me for a contrib for this..... ;o) p.p.s been watching DOCTOR WHO which is cool and im quite hiped --- thus the spelling mistakes ;o0
  19. .SQL FILES what are they all about? ive been playing again and have come across a nifty technique of editing all your product info altogether reasonably easilly. when uploaded to mysql via phpmyadmin all your products are edited within 0.3 seconds...... depending on the size of your catalog of course. what ive done is from admin, download a backup of your catalog. make a copy as it is. take the copy and edit it through admin tools - this separates it out with spaces so you can read it easilly. what you have here is a full backup of you catalog. now go through it an cutout everything not related to your products. essentially there are three table builds you need... products product_descriptions products_to_catagories. something like that. edit and make readable without deleating any necessary ():"@ bla bla bla code stuff. now you have one file from which to update everything to do with your products. follow the layout and you shouldnt go wrong.... test on new osc install on localhost and new populaTED DB so you dont distroy anything first. easy update the prices, description etc. i.e. everything you would do through many admin clicks but all thourgh one file next copy and paste your new sql code into myphpadmin under the sql tab i believe, and hey presto updated products. though you might like to play with this one..... ;o) matt
  20. good luck... ;o) for anyone else... the contribution will work as is with the old version of osc named ms2.2 060817. to find your.... as quoted above... so far, i am having some trouble with the dynamenu portion but i believe it is my error with configuring the proper root directory in the configure.php file. my hosting service, siteground, only shows me my root directory and then into pubic_html etc... but again, that is something i will investigate further. try making up a new php file and put into it something like this: <?php echo '<br>****************************************************************************'; echo '<br>Variables for sts_external_pages_templates setup'; echo '<br>Please see your catalog/includes/configure.php file.'; echo '<br>****************************************************************************'; $catalog_dir_name = substr(dirname(getenv('SCRIPT_NAME')), 1, -8); ECHO '<bR>catalog_dir_name = '.$catalog_dir_name; $script_filename = getenv('PATH_TRANSLATED'); if (empty($script_filename)) { $script_filename = getenv('SCRIPT_FILENAME'); } $script_filename = str_replace('\\', '/', $script_filename); $script_filename = str_replace('//', '/', $script_filename); $dir_fs_www_root_array = explode('/', dirname($script_filename)); $dir_fs_www_root = array(); for ($i=0, $n=sizeof($dir_fs_www_root_array)-1; $i<$n; $i++) { $dir_fs_www_root[] = $dir_fs_www_root_array[$i]; } $dir_fs_www_root = implode('/', $dir_fs_www_root) . '/'; $dm_root = $dir_fs_www_root; $dm_root = substr($dm_root, 0, 0); echo '<br>dm root = '.$dm_root; echo '<br>****************************************************************************'; ?> essentially what you want to do is echo to the screen the full root path. there are examples of this being done through the install files. the above code i adopted and placed in install/templates/pages/install_7.php so that the defined variable in configure has the correct setting. as for dm_header.php in dynamenu, because i have already done the variable build, you then need define it in configure.php or another file say path.php(after install) then put this varaible name in the correct place in dm_header.php as mentioned above. to start with --- the variable name you need is $dm_root in the example above. $dm_root = substr($dm_root, 0, -1); ------ -------substr() will cut bits out from the start and end but ive set this to 0,0 so nothing will get cut. so dont worry about that. this is only a very quick write up but should give you an idea of how to go about it. the above code will therefore need some tinkering but tinkering is what makes us learn so have fun.... matt
  21. THE VERSION OF OSC WHICH THIS CONTRIB WORKS WELL WITH - oscommerce-2.2ms2-060817.zip UPGRADE INFO FROM 060817 TO RC1 000 --- 001 CODE UPGRADE TO RC1 - osc22rc1_upgrade.html.zip
  22. please keep us updated on your rc1 install as i have not attempted it yet, however there is much code in the register globals contrib, dispersed accross many files and it would be a right pig to remove it all. better still i can give you all the additional contribs together without reglobs but it will take a couple of days filtering through it myself. this contrib is currently UNTESTED OR IS NOT BUILD FOR RC1. the reason being, i only heard about rc1 yesterday approx and had virtually completed this contrib for the previous version of osc. sorry a little behind the times still myself.
  23. 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
  24. 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.
×
×
  • Create New...