Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Any way to add "Specials" to the categories box?


JoeWoodworker

Recommended Posts

Posted

Is there a way to add a link in the categories box to the specials page?

 

Thanks

Joe

Evil will always triumph over good...

Because good is dumb.

- D.H.

Posted

Take a look at how the links are created in the Information InfoBox.

 

catalog/includes/boxes/information.php

 

This file is the best example of how to create individual links and should at least point you in the right direction.

 

Good Luck.

 

-R

Posted

I've looked at the code in both box's, In fact the info box I have modified to my needs. But, becuase of the fact that the catgories box is dynamic and the info box in static. I don't see what is needed to combine the two. I don't know about joewoodworker, but for me it is beyond my meger coding skills. Well, lack of coding skills. Your suggestion is a very good one, though, I've done plenty of cut and paste to get thing to work the way I want. And I wish that more people did just that. In fact, now that I have typed all this, I have decided to sit down and see if I can do just what joewoodworker wants, to see if I can do it.

 

I do have one question for joewoodworker.

 

Why do you want a specials link in the catagory box. The reason I ask this is; If you add items to your specials a box at the bottom of default.php shows up with all your specials. I know you have a good reason, it just sound redundant to me. Please, go ahead and change my mind.

Steve

-------------------------

Posted

Hi Steve,

 

The reason I want to add a Specials link to the categories page is so that customers can see all of the specials, not just the ones that randomly display in the side boxes. And I dont think too many people will assume that you can see all of the specials by clicking the arrow symbol in the boxes.

 

I figure that I have two options. 1) To change the arrow symbol to a graphics that reads 'more'. Or 2) Add a categories folder called 'specials' and copy all of the specials items into that folder.

 

Did you have any luck messing with this?

 

Thanks

Evil will always triumph over good...

Because good is dumb.

- D.H.

Posted

Or you could add a text line to the existing specials box, below the picture, that says "See All Specials" and mimic the link that the arrow points to.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Posted

Joe,

I haven't had the time. I do plan on trying this just as a learning experience. Maybe a day or two.

Steve

-------------------------

Posted

OK, here's a basic hack that you can modify to your needs.

 

Comment out this section at the bottom of /catalog/includes/boxes/catagory.php

 $info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

                            'text'  => $categories_string

                           );

new infoBox($info_box_contents);

 

And add this code to the bottom right below the above code.

  $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => $categories_string .

                    '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_GV_REDEEM, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//ICW ORDER TOTAL CREDIT CLASS/GV

 new infoBox($info_box_contents);

 

Now just edit the links to your needs and wahla you have what you need.

Steve

-------------------------

Posted

I'm happy to see that you guys were able to get this working! Like I said previously, the Information InfoBox is the best place to demonstrate how to create links in osC.

 

Have a great day!

 

-R

Posted

 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => $categories_string .

                              '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '">' . 'Specials' . '</a><br>'

    	 );

 new infoBox($info_box_contents);

 

Here is the actual code you need. Just follow the instructions above and insert this code at the bottom before the ?>

Steve

-------------------------

Posted

I just replaced the existing code with your updated code and all is good!

 

The only thing I noticed was that it doesnt go bold when you have navigated into the Specials page but I'm not worried about that.

 

Thanks!

 

Joe

Evil will always triumph over good...

Because good is dumb.

- D.H.

Archived

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

×
×
  • Create New...