Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Major "boxes.php" problem


Guest

Recommended Posts

Hello again. I'm in the process of completely transforming my site to look and function the way I want, using virtually no tables whatsoever. One of those changes require the modification of the appareance of the new products section on the main index page.

 

I discovered however, that for some strange reason, the way it is displayed is linked to the look of the info boxes in the left column. Further investigation shows that the culprit is the "boxes.php" class. If I change anything in that file, both the left menu, as well as the new products section change.

 

This was a major headache when I first created my site. So like any true amateur did, I sprayed $i variables and $i++ around and echoed its value in the site. I moved it around again & again, and eventually I was able to separate both the left menu, and the new products section in the main page by value (lol). I then did a detour with several "if-then-else", and got the whole mess to work just the way I want it to :D.

 

 

Today however, I want to start completely from scratch, and I want to separate both the menu, and the new section on the main page properly. I was thinking of keeping the "boxes.php" file, but making a duplicate "boxes2.php" just for the new products section. I just don't know how this is done :'( .

Link to comment
Share on other sites

I swear to god, even after punching at this for hours & hours, it seems the solution only comes after posting in here!

 

Okay here's the solution, this requires a modification to the boxes.php file. I noticed one single difference between the left menu and the new content box, and thats what 'class' is being called. Still peeved I never noticed that before.

 

In the new products section, it calls the "contentBox" class, while the left menu calls something else, I think "infoBox" or whatever. Looking at the "contentBox" classes in the boxes.php file, it kindof 'links' itself to the primary function called "tableBox". This function controls everything. I simply duplicated this function, named it "tableBox2", and changed the 'link' for "contentBox" (the one for the new products section on the main page) to point to it, and then I was able to very easily separate how that and the left menu works and looks.

 

Now, I just need to get rid of that <BR> tag, doesn't appear in "index.html", "boxes.php", or "new_products.php".

 

 

Um, thanks again I guess lol, and I hope this helps somebody :D.

Link to comment
Share on other sites

Could you share your code for the change to boxes.php?

 

I am looking for a way to get rid of the box around the new products module without removing it from all my boxes.

 

I dont care if I just have to change the color of the box 'frame' to the same as the background in the css I am just not sure what needs changed to edit just the new products box.

 

Thanks!!!

Link to comment
Share on other sites

Well, I answered my own question again :)

 

I just changed

 

new contentBox($info_box_contents);

 

to

 

new productListingBox($info_box_contents);

 

and my box 'frame' is gone!

 

Thanks for the inspiration Uncle Bob

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...