Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[COntribution] osC-ProductListingSelect for MS2


Guest

Recommended Posts

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

Works like a charm. B) Thanks a lot Randy. I'll be sure to paypal some cash your way as soon as the store starts making some money :D

In th emeantime maybe I can help out a bit by helping others with using your contrib.

 

Anyone having this problem, when switching to column mode, the productlisting header disappears. I have looked through the code and this piece of code is missing from the column listing part of the file. Any idea how to get the product listing header to appear when in column mode. This is the part across the top of the product table that has the + symbol in it. thanks

Erhm .. you call this a problem, but to use a popular (big company) phrase:

It's not a bug, it's an undocumented feature

In this case i believe it is accurate. Isn't this exactly what the contrib should do?

 

Normally the listing page has this layout (for instance)

 

 

IMAGE NAME + Price + <-- this is your header

 

img1 name1 price1

img2 name2 price2

 

which displays all your items in a neat list. This contrib lets you put the products in colums like this.

 

img1 img2

name1 name2

price1 price2

 

What sense would a header make in this context? What woudl you like the header to say ? column1 column2 ?

Can't think of a signature tight now. But just you wait till I read the next Discworld!

Link to comment
Share on other sites

Can someone post some examples of column verses list? I don't think I have this contrib working right. When I set mine to list I get:

Image

item name

price

 

Shouldn't it be:

image  item name    price 

My default osCommerce was the way you think the contrib should make it.

It was like :

image1 item name1 price1

image2 item name2 price2

image3 item name3 price3

 

If that is what you want , I don't see the point of using this contribution?

Can't think of a signature tight now. But just you wait till I read the next Discworld!

Link to comment
Share on other sites

  • 5 weeks later...

I'm hoping somebody can help me. I'm trying to use this contrib with the "Ezier New Fields" contrib to show the retail price and customer savings. The only problem is that I can't get the Ezier contrib to work in column mode (they work fine together in row mode).

 

A check of the Ezier support thread didn't show anyone using the two contribs together, so I thought I'd start here for some help.

 

Here is the relevent section of product_listing.php (the column section):

 

  } elseif (PRODUCT_LISTING_DISPLAY_STYLE == 'columns') {

   $info_box_contents = array();
   if ($listing_split->number_of_rows > 0) {
     $row = 0;
     $col = 0;
     $listing_query = tep_db_query($listing_split->sql_query);
     while ($listing = tep_db_fetch_array($listing_query)) {
       $listing['products_name'] = tep_get_products_name($listing['products_id']);
       
       if (PRODUCT_LIST_IMAGE > 0) {
      $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>';
       }
         
       if (PRODUCT_LIST_NAME > 0) {
      $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>';
       }

       if (PRODUCT_LIST_MODEL > 0) {
      $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_model'] . '</a><br>';
       }

       if (PRODUCT_LIST_MANUFACTURER > 0) {
      $lc_text .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a><br>';
       }

//	if (PRODUCT_LIST_RETAIL_PRICE > 0) {
//  if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
//    $lc_text = '<font color="#55508a">' . $currencies->display_price($listing['products_retail_price'], tep_get_tax_rate($listing['products_tax_class_id']));
//  } else {
//    $lc_text = ' ';
//  }
//	}

       if (PRODUCT_LIST_PRICE > 0) {
         if (tep_not_null($listing['specials_new_products_price'])) {
           $lc_text .= '<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
         } else {
           $lc_text .= ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
         }
       }

//	if (PRODUCT_LIST_SAVE > 0) {
//   if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
//     $lc_save = round(100 - (( $listing['products_price'] / $listing['products_retail_price'] ) * 100 ));
//     $lc_text = '<font color="red"> ' . $lc_save . '% </font>';
//	} else {
//     $lc_text = ' ';
//   }
//	}

       if (PRODUCT_LIST_BUY_NOW) {
         $lc_text .= '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</a>';      
       }

 

I have the contrib set up for three columns and I'm expecting to see the following in each column:

 

Image

Name

Retail Price

List Price

Savings

Buy Now

 

However, when I uncomment the PRODUCT_LIST_RETAIL_PRICE and PRODUCT_LIST_SAVE sections above all I get is the savings percent number (everything else disappears). I haven't as of yet figured out what the problem is.

 

Can anyone help?

Link to comment
Share on other sites

HOW TO SORT COLUMNS

 

Wouldn't that be the perfect headline for a manual? :P

 

Unfortunatly I won't be able to write this manual

since I just can't figure out howto sort my products

when my site is in column mode.

 

I want to pick these sort order settings from my

admin-settings, which is not that difficult.

But I am really desperate finding the proper

code to sort my articles.

 

Anyone? It's kind of urgent so:

 

:'( ANYONE? HELP! :'(

--

General, listen! Rico Pendel lives!

Link to comment
Share on other sites

Hi CorpBoy,

 

Try this:

 

You have to edit "catalog/index.php"

First, backup this file.

After, edit all lines that begin with:

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, (...)

Add all fields you want. For example: (retail_price):

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_retail_price, p.products_price, p.products_tax_class_id, IF(s.status, (...)

 

Then, edit "product_listing.php". Example:

$lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

$lc_text = ' ' . $currencies->display_price($listing['products_retail_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

 

That's all!

 

Good luck,

 

Gledison Souza

Webmaster

 

 

I'm hoping somebody can help me.  I'm trying to use this contrib with the "Ezier New Fields" contrib to show the retail price and customer savings.  The only problem is that I can't get the Ezier contrib to work in column mode (they work fine together in row mode).

 

A check of the Ezier support thread didn't show anyone using the two contribs together, so I thought I'd start here for some help.

 

Here is the relevent section of product_listing.php (the column section):

 

 ?} elseif (PRODUCT_LISTING_DISPLAY_STYLE == 'columns') {

? ?$info_box_contents = array();
? ?if ($listing_split->number_of_rows > 0) {
? ? ?$row = 0;
? ? ?$col = 0;
? ? ?$listing_query = tep_db_query($listing_split->sql_query);
? ? ?while ($listing = tep_db_fetch_array($listing_query)) {
? ? ? ?$listing['products_name'] = tep_get_products_name($listing['products_id']);
? ? ? ?
? ? ? ?if (PRODUCT_LIST_IMAGE > 0) {
? ? ? $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>';
? ? ? ?}
? ? ? ? ?
? ? ? ?if (PRODUCT_LIST_NAME > 0) {
? ? ? $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>';
? ? ? ?}

? ? ? ?if (PRODUCT_LIST_MODEL > 0) {
? ? ? $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_model'] . '</a><br>';
? ? ? ?}

? ? ? ?if (PRODUCT_LIST_MANUFACTURER > 0) {
? ? ? $lc_text .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a><br>';
? ? ? ?}

//	if (PRODUCT_LIST_RETAIL_PRICE > 0) {
// ?if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
// ? ?$lc_text = '<font color="#55508a">' . $currencies->display_price($listing['products_retail_price'], tep_get_tax_rate($listing['products_tax_class_id']));
// ?} else {
// ? ?$lc_text = ' ';
// ?}
//	}

? ? ? ?if (PRODUCT_LIST_PRICE > 0) {
? ? ? ? ?if (tep_not_null($listing['specials_new_products_price'])) {
? ? ? ? ? ?$lc_text .= '<s>' . ?$currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
? ? ? ? ?} else {
? ? ? ? ? ?$lc_text .= ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
? ? ? ? ?}
? ? ? ?}

//	if (PRODUCT_LIST_SAVE > 0) {
// ? if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
// ? ? $lc_save = round(100 - (( $listing['products_price'] / $listing['products_retail_price'] ) * 100 ));
// ? ? $lc_text = '<font color="red"> ' . $lc_save . '% </font>';
//	} else {
// ? ? $lc_text = ' ';
// ? }
//	}

? ? ? ?if (PRODUCT_LIST_BUY_NOW) {
? ? ? ? ?$lc_text .= '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</a>'; ? ? ?
? ? ? ?}

 

I have the contrib set up for three columns and I'm expecting to see the following in each column:

 

Image

Name

Retail Price

List Price

Savings

Buy Now

 

However, when I uncomment the PRODUCT_LIST_RETAIL_PRICE and PRODUCT_LIST_SAVE sections above all I get is the savings percent number (everything else disappears).  I haven't as of yet figured out what the problem is.

 

Can anyone help?

Link to comment
Share on other sites

  • 2 months later...

hi guys,

 

I installed this contribution and it works fine....thx a lot.

 

I have one little problem though,

 

I want to display the products this way

 

product name

product image

prize

buy now

 

 

I tried everything but it only displays

 

product image

product name

prize

buy now

 

 

I tried to edit the code in the product_listing.php

 

 

this is the normal code

 } elseif (PRODUCT_LISTING_DISPLAY_STYLE == 'columns') {

   $info_box_contents = array();
   if ($listing_split->number_of_rows > 0) {
     $row = 0;
     $col = 0;
     $listing_query = tep_db_query($listing_split->sql_query);
     while ($listing = tep_db_fetch_array($listing_query)) {
       $listing['products_name'] = tep_get_products_name($listing['products_id']);



       if (PRODUCT_LIST_IMAGE > 0) {
      $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>';
       }
         
   
      if (PRODUCT_LIST_NAME > 0) {
      $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>';
       }
 
       if (PRODUCT_LIST_MODEL > 0) {
      $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_model'] . '</a><br>';
    
       }

 

 

 

and I tried this but it wont show the product name

 } elseif (PRODUCT_LISTING_DISPLAY_STYLE == 'columns') {

   $info_box_contents = array();
   if ($listing_split->number_of_rows > 0) {
     $row = 0;
     $col = 0;
     $listing_query = tep_db_query($listing_split->sql_query);
     while ($listing = tep_db_fetch_array($listing_query)) {
       $listing['products_name'] = tep_get_products_name($listing['products_id']);


      if (PRODUCT_LIST_NAME > 0) {
      $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>';
       }


       if (PRODUCT_LIST_IMAGE > 0) {
      $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>';
       }
         
   

       if (PRODUCT_LIST_MODEL > 0) {
      $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_model'] . '</a><br>';
    
       }

 

 

can anybody help?

 

regards

moe

Link to comment
Share on other sites

  • 1 month later...

Hello

 

Thank you a lot for your contribution.

 

But as I am a really beginner, I did not get where to do the changes mentioned in the readme:

 

1. DATABASE - INSERT the following MySQL statements into your database,

    either from the command line or via phpMyAdmin.

 

  INSERT INTO configuration VALUES ('', 'Product Listing Display Style', 'PRODUCT_LISTING_DISPLAY_STYLE', 'list', 'Choose which Style you would like use to display your products on the Product Listing Pages.<br><br>Whichever style you choose, make sure you configure the appropriate settings for the style of listing you have selected.', 8, 0, NULL, now(), '', 'tep_cfg_select_option(array(\'list\', \'columns\'),');

  INSERT INTO configuration VALUES ('', 'Number of Columns for Product Listing', 'PRODUCT_LIST_COL_NUM', '3', 'Enter the number of columns you would like to display your products on the Product Listing pages.', 8, 1, NULL, now(), NULL, NULL);

 

I would be verry nice if you could tell me, where the file is located, and how it is named.

Is it in admin > includes > function > database.php ?

 

Thanks for your pacience and helpjava script:emoticon(':thumbsup:')

 

cheers

Stefan

Link to comment
Share on other sites

  • 3 weeks later...
Hello

 

Thank you a lot for your contribution.

 

But as I am a really beginner, I did not get where to do the changes mentioned in the readme:

I would be verry nice if you could tell me, where the file is located, and how it is named.

Is it in admin > includes > function > database.php ?

 

Thanks for your pacience and helpjava script:emoticon(':thumbsup:')

 

cheers

Stefan

 

You need to make those changes to your sql database. You can access this through your hosts control panel, usually using MyPhpAdmin or similar. If in doubt contact your host or have a look at your hosts control panel.

 

Will.

Link to comment
Share on other sites

  • 1 month later...

I have installed this and it works perfectly,

 

the only problem i amhaving is trying to change the style of the column view.

 

wheni edit the stylesheet TABLE.ProductListings, TR.ProductListings-odd ect.. it onky changes the list view.

 

How can i add borders and background colours to the column boxes?

 

cat_sty.gif

Edited by pixelhub
Link to comment
Share on other sites

I have installed this and it works perfectly,

 

i shouldn't have wrote that. :'(

 

The sort order in the Product Listing admin will not work with the column view only in list view.

 

i only installed this for the column view, so its disapointing, the list view works great i just need help with the colmn view.

 

Cheers

Craig

Link to comment
Share on other sites

  • 3 months later...

asking a question about fonctionnality :

 

did you guys don't thing it s interesting also that the vistor can decide to change the listing view by cliking on the listing to change the way of listing ??

MS2

Link to comment
Share on other sites

  • 2 weeks later...

I've installed this mod with the changing the code in phpmyAdmin, and I select 3 columns but the products still list in 1 column (image, name, price, buy now.)

 

I've reinstalled it but still can't make it reflect the columns in the actual site.

 

Any suggestions?

Link to comment
Share on other sites

  • 2 weeks later...

I've installed this mod again and made the changes in the "read me" file to the database. When I go into the admin of the cart, it allows me to select "columns" and set the number of columns. But, when I view the site, the columns don't show up. It remains the standard layout (image, name, price, buy now.)

 

Any suggestions as to what to do to figure out why this is happening?

 

Let me know. I have a deadline soon and the client really wants the products displayed in colums with the image, name, price and buy now stacked on top of each other.

Edited by vondada
Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I just installed the module "osCProductListingSelect for MS2 update1_1" and I want to make a small change to the listings...

 

Current listing is like this:

 

(Picture)

(Name)

(Price)

<buy now button>

 

Clicking (Picture) sends you to product info

Clicking (Name) sends you to product info as well..

 

What I would like changed:

1) I would like to get the pop-up view when clicking (Picture)

2) I would like a new button to the left of the buy now button with <Details> and when you click on <Details> you are send to product info.

 

Anyone able to help me with that?

 

Thanks in advance!

 

To vonada: did you ever get it to work?

 

Kind regards

Thomas

Link to comment
Share on other sites

  • 1 month later...

i need help for this little question, please!

the thing is that the store i'm making is for a jewellery, so i would like that the weight would be displayed inplace of the price... that would be:

 

*image*

*name*

*weight*

*buy now*

 

thanks in advanced! (:

Link to comment
Share on other sites

please? :blush:

 

uhm, maybe there's a special tag for the product weight appears, i dont know, like $product_weight

or how's with the price?

 

thanks! :blush:

Link to comment
Share on other sites

Just thought I would post this incase anyone else has the same problem.

 

Please help. Getting a parse error when clicking on edit to change from list to column.

 

Parse error: parse error in /home/thepierc/public_html/admin/configuration.php(125) : eval()'d code on line 1

 

 

I don't believe I made any alterations on the configuration.php file.

 

I am sure this has been sorted by now but I had the same problem and I tracked it down to the entry in the database:

 

WAS THIS:

'tep_cfg_select_option(array(\'list\', \'columns\'),');

 

CHANGED TO:

tep_cfg_select_option(array('list', 'columns'),

Works now.

Link to comment
Share on other sites

hi there...

 

very cool contribution!

prefer it over the other contributions because of the 'list/column' choise and the column settings...

there's one, for me quite significant, problem though...

 

how do I change the part where the products get dumped into an 'infoBox' class table ?

would like to change the product listing layout through css without making changes to the overall site infoboxes...

 

so what part of the code controls the class the product listing gets ?

 

 

thanx

pHaL

Link to comment
Share on other sites

Let me add to the thanks and praise for this simple yet powerful contribution. Now I am trying to install the add on "Mazen's Products Listing In Columns Based on CategorieS"

 

Does anyone have experience with it?

 

In the install doc that comes with it, I can't find the following in my ?categories.php? file.

 

4) Then something around line 442 find:

 

$categories_description = $HTTP_POST_VARS['categories_description'];

Perhaps that line is no longer there or has been modified into other code. I am running the latest version of oscom.

 

Any ideas? - thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...