Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product listing


User Name

Recommended Posts

Posted

The specials box, featured products (from contribution), and categories obviously all provide links to product lists. None of them look the same though. I like the way the items within a category are listed the best, and think it would be helpful to customers for it to be standard. Is this possible?

 

thanks

Posted
Install this contribution: osC-ProductListingSelect for MS2

 

It's easy to install and let's you choose the listing style from the admin control panel.

 

well, i tried the contribution. if i am doing things correctly, i can have the categories display in columns like the specials, but I cannot have the specials display in a list. and the featured items stay the same regardless.

 

none of this is earth shattering, i was just hoping to get all of them to list just like the categories list - think this looks the best.

 

thanks

Posted

hi ashley

I know what you are after and actually did the same yesterday on my site.

I was looking for this in the contribution area earlier, but I couldn't find anything that gave instructions to do this. As I hate it when people upload duplicate contributions, I wanted to have another more thorough look before uploading this tip.

 

As I customized my store, I have to back trace it to MS2 standard to make a contribution with installation instructions, but in short you have to in the catalog/specials.php and catalog/products_new.php make these kinds of changes:

1) find the query with the select statement, eg in specials it is called special_query_raw

2) rename this to $listing_sql so you have something like

$listing_sql = 'select products_id, ...'

3) Add after this

  include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);

4) remove all the subsequent lines - except for the last </td></tr></table></td> till the body eof html comment.

 

THE END- Now you have in specials.php (products_new select statement is slightly different)

<?php
 $listing_sql = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC";
 include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); 
?>
</td></tr>
  </table></td>
<!-- body_text_eof //-->

 

The catch ?

A)If you decide to show columns in your product listing that are not viewable in the categories listing, you will have to manaually add them to the $listing_sql select statement in this page.

B) The maximum number of products to show on a page is MAX_SEARCH_RESULTS for all of them, specials and what'new also.

 

HTH

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Posted
hi ashley

I know what you are after and actually did the same yesterday on my site.

I was looking for this in the contribution area earlier, but I couldn't find anything that gave instructions to do this. As I hate it when people upload duplicate contributions, I wanted to have another more thorough look before uploading this tip.

 

As I customized my store, I have to back trace it to MS2 standard to make a contribution with installation instructions, but in short you have to in the catalog/specials.php and catalog/products_new.php make these kinds of changes:

1) find the query with the select statement, eg in specials it is called special_query_raw

2) rename this to $listing_sql so you have something like

$listing_sql = 'select products_id, ...'

3) Add after this

  include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);

4) remove all the subsequent lines - except for the last </td></tr></table></td> till the body eof html comment.

 

THE END- Now you have in specials.php (products_new select statement is slightly different)

<?php
 $listing_sql = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC";
 include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); 
?>
</td></tr>
  </table></td>
<!-- body_text_eof //-->

 

The catch ?

A)If you decide to show columns in your product listing that are not viewable in the categories listing, you will have to manaually add them to the $listing_sql select statement in this page.

B) The maximum number of products to show on a page is MAX_SEARCH_RESULTS for all of them, specials and what'new also.

 

HTH

 

 

sounds good i will try it and let you know if i can get it to work

Posted

hi ashley

Any luck with the modifications ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

  • 2 weeks later...
Posted

I've tried the instructions to no avail.

It seems I am not interpreting them correctly.

Perhaps you can post your whole working specials.php page

 

Thanks

I have moved on from oscommerce to magento and no longer monitoring this site.

Posted

I sent you my file by email.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Archived

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

×
×
  • Create New...