Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Question about first page


SeanDelaney

Recommended Posts

Posted

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

Posted
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

 

 

this will cause you to lose your session for sure.

Treasurer MFC

Posted
care to explain that a bit?

 

 

if you insert direct references without using tep_href_link, you will lose your session id if the customer has cookies disabled.

Treasurer MFC

Posted

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.

Posted

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.

Posted

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

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

 

 

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

Posted
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

 

 

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

Posted
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

 

 

well,

 

<a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=2'); ?> "><img src="your image filename"></a>

Treasurer MFC

Posted

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.

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

 

 

well, test it yourself,

 

set your browser to refuse cookies, login, click on the links and see if you remain logged in.

Treasurer MFC

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...