Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help getting a new function to work


niknakgroup

Recommended Posts

Posted

OK, I have spent the last week trying to implement a modification by introducing a new "manufacturers" type filter to my site; I have the admin side working perfectly, so that as well as giving a product a manufacturer, I can also now give it a designer. I was thinking along the lines of an author/publisher type search filter for bookstores, where the categories are in addition to the author or publisher filter you wish to put on them - my site has an ever increasing number of products, and I thought this would be another way to help my customers find what they are looking for. However, no matter what I seem to do, I cannot get the catalog side to work at all, and I think I must be missing something somewhere. As this will work in exactly the same way as the manufactureres filter already works, and I am not an expert php coder by any stretch of the imagination, I have simply gone through every file within catalog, and wherever a reference is made to manufacturers, or any information is pulled from the manufacturers table, I have copied that bit of code and added it below, changing manufacturer to designer every time. So far, I have changed:

 

advanced search.php

advanced_search_result.php

includes/application_top.php

includes/database_tables.php

includes/filenames.php

includes/functions/general.php

includes/functions/html_output.php

 

and in each case have added in designer sections and double checked my syntax. My site works with no errors, yet the designer search filter does not work; as an example,

 

http://domain/advanced_search_result.php?keywords=earring

Earrings

should return 553 results, which it does.

 

http://domain/advanced_search_result.php?k...g&designer_id=2 Earrings by Elements Gold

Should only return 83 results, which it still shows 553.

 

I know I'm being greedy wanting two possible filters, but am I missing an important file containing code relating to the manufacturers table, or products table refencing the manufacturers_id column, which I have somehow missed? Or is my code not working for a more technical reason - (i.e. I haven't got a clue what I'm doing!).

 

I know I still need to change index.php to complete the alterations, but as the modification isn't working properly, I dont want to confuse customers by offering something that doesnt work!

 

Hopefully a techno-wizard out there somewhere can take a peek and help me get this working, once its fixed this will be a cool contrib, which I am sure will help many other store owners. All help very gratefully received! :blush:

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Posted

have you tryed a where clause of the query in advanced_search.php or advanced_search_results.php, like: where like manufacture = $the_search_manufacture

 

Kind Regards

 

Dave

Archived

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

×
×
  • Create New...