Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Question about first page


SeanDelaney

Recommended Posts

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

 

 

well, why not dropping them a line and ask them

Treasurer MFC

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...