Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

More on Product Sorting request for help


Dragonkeeper

Recommended Posts

I have taken a look at the Product Sort mod but that seems to be overkill for what I need. I just

need to change the sort order of my Product listings within their Categories to be a fixed sort order

based on the Product Name instead of the Date Added. Is there a simpler way to accomplish this

besides installing the Product Sort mod? Thanks again if you can help.

Link to comment
Share on other sites

Dragonkeeper, Huh?

 

By default the sort order of my Product listings within their Categories are based on the Product Name - and not the Date Added...

 

the only thing i see that you might be asking which is not default is that the order is not "FIXED" - it's dynamic > you can reorder the listing by clicking the header titles of the listing...

 

am i not understanding you? what am i missing???? Are you not refering to the Product listing, but instead refering to the What's New box????????

Link to comment
Share on other sites

Yeah. I collect figurine dragons. ;)

 

Anyway, your reply is, believe it or not, an immense help. What I have tried to do is install a third-party

menu system which seems to have blown out the defaults and dynamics of the sorting by clicking on the

header titles. Thank you very much for this information.

 

Dragonkeeper, Huh?

 

By default the sort order of my Product listings within their Categories are based on the Product Name - and not the Date Added...

 

the only thing i see that you might be asking which is not default is that the order is not "FIXED" - it's dynamic > you can reorder the listing by clicking the header titles of the listing...

 

am i not understanding you? what am i missing???? Are you not refering to the Product listing, but instead refering to the What's New box????????

Link to comment
Share on other sites

Well, as long as you're asking...

 

Can you tell me which file I would need to modify if I wanted to change some of the information

contained in the "What's New for..." box? Under each picture in this box is the Product Name and

Price. I want to change this to the Product Model and Price. How would I go about doing that?

 

(And, anyone can jump in here if they can answer this one).

 

that'll will be $12 :D just kidding - glad i could help, even if in the odd way -

 

anything else?

Link to comment
Share on other sites

Well, as long as you're asking...

 

Can you tell me which file I would need to modify if I wanted to change some of the information

contained in the "What's New for..." box? Under each picture in this box is the Product Name and

Price. I want to change this to the Product Model and Price. How would I go about doing that?

 

(And, anyone can jump in here if they can answer this one).

 

that'll will be $12 :D just kidding - glad i could help, even if in the odd way -

 

anything else?

Link to comment
Share on other sites

near the top of include/modules/new_products.php

add p.products_model,

to both $new_products_query = tep_db_query( ... statements

(both to be safe)

insert it near the beginning of the sql statement:

so that:

p.products_id, p.products_image,

becomes:

p.products_id, p.products_model, p.products_image,

 

do the above for both the IF and ELSE query statements to be safe --

 

THEN farther down change:

										   'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

by inserting . '<br>' . $new_products['products_model'] so that when added it looks like this:

										   'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '<br>' . $new_products['products_model'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

 

try that - let me know how it goes....

 

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

 

before you try it however you might want to check out my tip/tweak concerning include/modules/new_products.php

display Regular & Special price in main WHAT'S NEW box - cuase if you like what i present there then i suggest do that first, then apply the above edits from this post...

 

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

 

i posted another net tip -- i think all using US curency should use it:

Allow "$" in Advanced Search (+ pre"1970" dates) ;)

Link to comment
Share on other sites

Worked perfectly! Thanks again.

 

(I need to keep your moniker handy) ;)

 

near the top of include/modules/new_products.php

add p.products_model,

to both $new_products_query = tep_db_query( ... statements

(both to be safe)

insert it near the beginning of the sql statement:

so that:

p.products_id, p.products_image,

becomes:

p.products_id, p.products_model, p.products_image,

 

do the above for both the IF and ELSE query statements to be safe --

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...