Aprilrobin Posted April 9, 2007 Share Posted April 9, 2007 (edited) Need desperate Help with making a Php link to a catalog page. I know you guys tried to help me with this last week and I thank you again, but I had no idea about "session Ids". Agh to php! Here is where I'm confused. I just want to make a text link to a categroy page from my index page.... regular old text link, but I do not want to lose my session ID. I see instruction of how to do this for stuff like "checkout pages" but I do not understand how to do it with the cpath. As of now I have it linked with just the cpath and it links to "http://localhost/catalog/index.php?cPath=21" It works in general - gets me to the page, but now I know In order to not lose my session id i would need to link it simialr to this checkout example below: <?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT) . '">' . 'CHECKOUT' . '</a>'; ?> Or like this: <a href="<?php echo tep_href_link(FILENAME_CHECKOUT, '', 'SSL'); ?>" class="links"><?php echo HEADER_TITLE_CHECKOUT; ?></a> upon searching the forms I gather that I need to use the category "cpath" but I had tried it a few different ways and just keep getting an error page. Could anyone plase possibly explain to me using the category I posted above? This would shed a TON of light for me! Thank you! April Edited April 9, 2007 by Aprilrobin Quote Link to comment Share on other sites More sharing options...
sefimor Posted April 9, 2007 Share Posted April 9, 2007 Need desperate Help with making a Php link to a catalog page. I know you guys tried to help me with this last week and I thank you again, but I had no idea about "session Ids". Agh to php! Here is where I'm confused. I just want to make a text link to a categroy page from my index page.... regular old text link, but I do not want to lose my session ID. I see instruction of how to do this for stuff like "checkout pages" but I do not understand how to do it with the cpath. As of now I have it linked with just the cpath and it links to "http://localhost/catalog/index.php?cPath=21" It works in general - gets me to the page, but now I know In order to not lose my session id i would need to link it simialr to this checkout example below: <?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT) . '">' . 'CHECKOUT' . '</a>'; ?> Or like this: <a href="<?php echo tep_href_link(FILENAME_CHECKOUT, '', 'SSL'); ?>" class="links"><?php echo HEADER_TITLE_CHECKOUT; ?></a> upon searching the forms I gather that I need to use the category "cpath" but I had tried it a few different ways and just keep getting an error page. Could anyone plase possibly explain to me using the category I posted above? This would shed a TON of light for me! Thank you! April Hi, i am also new here just lerning... but i will try my best o help: if you want to go to page you can use something like this: ?php echo '<a href="' . tep_href_link('support.php') . '">' . 'Support' . '</a>'; ?> if you want to go to a specific category or product you should use the path something like this:with the spesific path number: <?php echo '<a href="' . tep_href_link('index.php','cPath=put the number here') . '">' . 'filename'. '</a>'; ?> I Hope it will work for you,let me know :-" Quote Link to comment Share on other sites More sharing options...
Aprilrobin Posted April 9, 2007 Share Posted April 9, 2007 (edited) Hi, i am also new here just lerning...but i will try my best o help: if you want to go to page you can use something like this: ?php echo '<a href="' . tep_href_link('support.php') . '">' . 'Support' . '</a>'; ?> if you want to go to a specific category or product you should use the path something like this:with the spesific path number: <?php echo '<a href="' . tep_href_link('index.php','cPath=put the number here') . '">' . 'filename'. '</a>'; ?> I Hope it will work for you,let me know :-" <strike>thank you so much! I get the cpath part! but now I am confused about the file name... what would the file name be for a category? I suppose I don't understand what file it actually brings up.</strike> Oh nevermind I get it = file name = name to be displayed as the text link! duh! Thank you, you just saved me a TON of grief! Edited April 9, 2007 by Aprilrobin Quote Link to comment Share on other sites More sharing options...
bkellum Posted April 10, 2007 Share Posted April 10, 2007 April, You should use the following for your category 21 link: <a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a> Hope this has helped, Quote 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 More sharing options...
Guest Posted April 10, 2007 Share Posted April 10, 2007 HiI Have A Big Problem ,some of my placeholders are not working: 1.The SearchBox -when i try to search a products i get this eror: "Products meeting the search criteria 1054 - Unknown column 'switchcart.p2pef.manufacturers_id' in 'on clause' select count(distinct p.products_id) as total from (products p left join products_to_products_extra_fields p2pef on p.products_id=p2pef.products_id) left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%10g%' or p.products_model like '%10g%' or m.manufacturers_name like '%10g%' or p2pef.products_extra_fields_value like '%10g%') " 2. Worst-The Add To Cart Button does not works when i use it in product info templates. The other placeholders are working... Do you know what's the problem?? Thanks 1) The search box problem is not related to STS, you have modified your search box query and this is what gives the error. 2) Have you placed $startform and $endform on your template? Check the source code in your browser: is your button between <form> and </form>? - Rigadin2 Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Has anyone tried philbar's latest full package version? (Apr 09 2007) Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Has anyone tried philbar's latest full package version? (Apr 09 2007) Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Has anyone tried philbar's latest full package version? (Apr 09 2007) Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Has anyone tried philbar's latest full package version? (Apr 09 2007) Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Has anyone tried philbar's latest full package version? (Apr 09 2007) Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Sorry about that! My comp spazzed out! Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Sorry about that! My comp spazzed out! Quote Link to comment Share on other sites More sharing options...
chrisgeek Posted April 10, 2007 Share Posted April 10, 2007 Sorry about that! My comp spazzed out! Quote Link to comment Share on other sites More sharing options...
bkellum Posted April 10, 2007 Share Posted April 10, 2007 (edited) Has anyone tried philbar's latest full package version? (Apr 09 2007)Chris,I did a file comparison to the compiled version that I made for myself and the two (mine & Philbar's) are identical. By the way...thanks Philbar for compiling the service packs together. That is always a good thing to have. It is usually better to do once a few weeks have past so that it gives some time to find any bugs (bugs? What are bugs?). :- Edited April 10, 2007 by bkellum Quote 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 More sharing options...
sefimor Posted April 10, 2007 Share Posted April 10, 2007 1) The search box problem is not related to STS, you have modified your search box query and this is what gives the error.2) Have you placed $startform and $endform on your template? Check the source code in your browser: is your button between <form> and </form>? - Rigadin2 Hi Rigadin, Thank you for answer number 2, about the search eror- can you please tell me where to look for the answer?I looked for an answer for a long time :'( Thanks again Racheli & Seffi Quote Link to comment Share on other sites More sharing options...
sefimor Posted April 10, 2007 Share Posted April 10, 2007 1) The search box problem is not related to STS, you have modified your search box query and this is what gives the error.2) Have you placed $startform and $endform on your template? Check the source code in your browser: is your button between <form> and </form>? - Rigadin2 Hey Rigadin, Thank you, you helped us alot! Racheli & Seffi Quote Link to comment Share on other sites More sharing options...
sefimor Posted April 10, 2007 Share Posted April 10, 2007 1) The search box problem is not related to STS, you have modified your search box query and this is what gives the error.2) Have you placed $startform and $endform on your template? Check the source code in your browser: is your button between <form> and </form>? - Rigadin2 Hey Rigadin, Thank you, you helped us alot! Racheli & Seffi Quote Link to comment Share on other sites More sharing options...
Aprilrobin Posted April 10, 2007 Share Posted April 10, 2007 (edited) Need help with STS4.5 and Dynamenu. Does anyone have any idea what this error is about? "Fatal error: Call to a member function image() on a non-object in C:\Program Files\xampp\htdocs\catalog\includes\functions\html_output.php on line 78" I read Bill Kellums tutorial and the tips here on the forum but I can't figure out why this is happing. Please remember that I'm a php virgin here. Here's what I've done: 1. I treid with infobox templates set to true and false. 2. Added the vrticle flyout menu styles to my stylesheet. 3. Added this code to the bottom of application_bottom.php right before the closing ?> // Output the footer for Dynamenu for osCommerce echo $GLOBALS['dmfooter']; 4. Addedthis line of code to index.php.html where I wanted my menu to appear: <?php include(DIR_WS_BOXES . 'dm_categories.php'); ?> 5. added this line of code to the bottom of index.php.html right befor ethe closing body tag: <?php echo $GLOBALS['dmfooter']; ?> Have I just totally effed myself at this point? I also, uploaded all the appropriate files, lol. shoulda added that. Edited April 10, 2007 by Aprilrobin Quote Link to comment Share on other sites More sharing options...
foziw Posted April 10, 2007 Share Posted April 10, 2007 Hello, I am having a serious error on my freshly installed shop and STS. Getting this: Fatal error: Call to undefined function: image() in /mnt/w0200/d16/s30/b02ac612/www/cestasdefruta.net/includes/functions/html_output.php on line 78 and the php code on that line is this: //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } //// Thanks you so much for the help Quote Link to comment Share on other sites More sharing options...
bkellum Posted April 10, 2007 Share Posted April 10, 2007 Hello, I am having a serious error on my freshly installed shop and STS. Getting this: Fatal error: Call to undefined function: image() in /mnt/w0200/d16/s30/b02ac612/www/cestasdefruta.net/includes/functions/html_output.php on line 78 and the php code on that line is this: //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } //// Thanks you so much for the help Upgrade to STSv4.5.2 and your error should go away. The actual problem lies with a bug that showed up since v4.4. Bug fix 1 of 2 can be found at: http://www.oscommerce.com/forums/index.php?s=&...t&p=1023674 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'); ?> Bug fix 2 of 2 can be found at: http://www.oscommerce.com/forums/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. Quote 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 More sharing options...
bkellum Posted April 10, 2007 Share Posted April 10, 2007 Need help with STS4.5 and Dynamenu. Does anyone have any idea what this error is about? "Fatal error: Call to a member function image() on a non-object in C:\Program Files\xampp\htdocs\catalog\includes\functions\html_output.php on line 78" See my post above. Seeing that you upgraded to v4.5, you added the code in application_top.php in the wrong place. The STS code should be added before the message_stack routine. Quote 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 More sharing options...
Aprilrobin Posted April 11, 2007 Share Posted April 11, 2007 OK guys. this is probably the stupidest question ever on here. My catalog seems to be working fine but when I hit "top" on my breadcrumbs it takes me to http://localhost/xampp/. I suppose I am not really understnding how index.php reads my template, especially sicne my template is in the catalog. is this a case of my templates not being recognized? If I've been working all this time on my template which is index.php.html, how do I get those two to, ya know, talk? Technology is neat but I miss the days when I was supersmart for being able to code html, seriously, sometimes. Quote Link to comment Share on other sites More sharing options...
daknoodle Posted April 11, 2007 Share Posted April 11, 2007 Okay, I got a fresh install of OSC and just went through the install doc and I am not seeing STS in the admin. Not sure what I did wrong, I simply copied all of the files and directories over as the doc explained. Please help. thanks, Doug Quote Link to comment Share on other sites More sharing options...
Ackis Posted April 11, 2007 Share Posted April 11, 2007 Did you go to the modules catalog first? It should be there... something like yourdomain.... oscommerce_st/catalog/admin/ then modules and there should be your sts catalog regards Jessica Quote Jessica Fuchs Link to comment Share on other sites More sharing options...
daknoodle Posted April 11, 2007 Share Posted April 11, 2007 Yes, the only three that are listed under modules are "Payment", "Shipping", and "Order Total". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.