SeanDelaney Posted December 22, 2004 Posted December 22, 2004 Hey all... I wanted to know if someone could tell me how these guys got rid of the "New Products for..." section and replaced it with static links to their categories? http://www.terrellowens.com/catalog/index.php thanks in advance. Sean
boxtel Posted December 22, 2004 Posted December 22, 2004 Hey all... I wanted to know if someone could tell me how these guys got rid of the "New Products for..." section and replaced it with static links to their categories? http://www.terrellowens.com/catalog/index.php thanks in advance. Sean <{POST_SNAPBACK}> well, why not dropping them a line and ask them Treasurer MFC
SeanDelaney Posted December 22, 2004 Author Posted December 22, 2004 Thanks box, but I tried and got no response.
AllanH Posted December 22, 2004 Posted December 22, 2004 Personally, I would open index.php and find line 336 (or thereabouts): <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> and replace it with: <tr> <td><a href="index.php/cpath/x1">Category 1</a> : <a href="index.php/cpath/x2">Category 2</a> : <a href="index.php/cpath/x3">Category 3</a> </td> </tr> Not the most elegant solution, but it will work. - A
boxtel Posted December 22, 2004 Posted December 22, 2004 Personally, I would open index.php and find line 336 (or thereabouts): <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> and replace it with: <tr> <td><a href="index.php/cpath/x1">Category 1</a> : <a href="index.php/cpath/x2">Category 2</a> : <a href="index.php/cpath/x3">Category 3</a> </td> </tr> Not the most elegant solution, but it will work. - A <{POST_SNAPBACK}> this will cause you to lose your session for sure. Treasurer MFC
boxtel Posted December 22, 2004 Posted December 22, 2004 care to explain that a bit? <{POST_SNAPBACK}> if you insert direct references without using tep_href_link, you will lose your session id if the customer has cookies disabled. Treasurer MFC
AllanH Posted December 22, 2004 Posted December 22, 2004 okay, yeah, I get what you mean if you're not forcing cookies or otherwise have URL's that carry the session id. Personally, I hate seeing e23knf2f3n34j1t51kk4jk23nk124n3214k21 in my URL's, so I force cookies and thus, I believe, this would work? I'm no coding genius or anything, obviously.
AllanH Posted December 22, 2004 Posted December 22, 2004 sorry for the double post - boxtel replied while I was writing the above - so yeah, simply remove the include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); and write your own links using tep_href_link.
SeanDelaney Posted December 22, 2004 Author Posted December 22, 2004 Allan or Box, I have done as allen mentioned (commented out the sections I don't need) but now how do i force the links to maintain sessions if I am not forcing cookies??? Is there a variable i need to use when linking the image(s)... Thanks, Sean
boxtel Posted December 22, 2004 Posted December 22, 2004 okay, yeah, I get what you mean if you're not forcing cookies or otherwise have URL's that carry the session id. Personally, I hate seeing e23knf2f3n34j1t51kk4jk23nk124n3214k21 in my URL's, so I force cookies and thus, I believe, this would work? I'm no coding genius or anything, obviously. <{POST_SNAPBACK}> yes, as far as I can tell, when forcing cookies this seems to work file, but if not, your session is gone and so is your cart and logged on users. so I would always use tep_href_link() just to be safe. and it is simpel : <a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '"> Treasurer MFC
boxtel Posted December 22, 2004 Posted December 22, 2004 Allan or Box, I have done as allen mentioned (commented out the sections I don't need) but now how do i force the links to maintain sessions if I am not forcing cookies??? Is there a variable i need to use when linking the image(s)... Thanks, Sean <{POST_SNAPBACK}> to take allan's example: <a href="index.php/cpath/x2">Category 2</a> : you write : <a href="<?php echo tep_href_link('index.php', '/cpath/x2'); ?> "></a> the function takes this: function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { Treasurer MFC
SeanDelaney Posted December 22, 2004 Author Posted December 22, 2004 Boxtel, I tried what you said, but when I mouse over the image now the link shows to be, http://www.seantaylor36.com/catalog/index.php?/cpath/x2 You can view my store at, http://www.seantaylor36.com/catalog/index.php, and I have added the image map to the upper left box. Thanks
boxtel Posted December 22, 2004 Posted December 22, 2004 Boxtel, I tried what you said, but when I mouse over the image now the link shows to be, http://www.seantaylor36.com/catalog/index.php?/cpath/x2 You can view my store at, http://www.seantaylor36.com/catalog/index.php, and I have added the image map to the upper left box. Thanks <{POST_SNAPBACK}> well, <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=2'); ?> "><img src="your image filename"></a> Treasurer MFC
SeanDelaney Posted December 22, 2004 Author Posted December 22, 2004 Ok, I got that and it seems to be working... So by doing it this way it will preserve the session for the user? Thanks again for all your help guys.
boxtel Posted December 22, 2004 Posted December 22, 2004 Ok, I got that and it seems to be working... So by doing it this way it will preserve the session for the user? Thanks again for all your help guys. <{POST_SNAPBACK}> well, test it yourself, set your browser to refuse cookies, login, click on the links and see if you remain logged in. Treasurer MFC
Recommended Posts
Archived
This topic is now archived and is closed to further replies.