Jump to content
Sign in to follow this  
djmonkey1

Product Listing in Columns v2.0

Recommended Posts

hello,

 

i wanted to install this great contribution BUT have one concern: I have had other contributions added to my cart and the product_listing.php had been changed drastically (contribution i have included: B2B suite, Master Product).

 

The last instruction on the "install new_install" said:

 

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

In filenames.php change

 

define('FILENAME_PRODUCT_LISTING', 'product_listing.php');

 

to

 

define('FILENAME_PRODUCT_LISTING', 'product_listing_col.php');

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

if i changed the above line, my question: WILL IT HAVE ANY AFFECT ON MY CART?

 

my product_listing.php look like this:

 

<?php

/*

$Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Master Products - JOHNSON - 05/07/2003 matti@suomedia.com

 

Copyright © 2003 Suomedia - Dynamic Content Management

 

Released under the GNU General Public License

*/

 

$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

 

if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>

<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table>

<?php

}

 

$list_box_contents = array();

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$lc_text = TABLE_HEADING_MODEL;

$lc_align = '';

break;

case 'PRODUCT_LIST_NAME':

$lc_text = TABLE_HEADING_PRODUCTS;

$lc_align = '';

break;

case 'PRODUCT_LIST_MANUFACTURER':

$lc_text = TABLE_HEADING_MANUFACTURER;

$lc_align = '';

break;

case 'PRODUCT_LIST_PRICE':

$lc_text = TABLE_HEADING_PRICE;

$lc_align = 'right';

break;

case 'PRODUCT_LIST_QUANTITY':

$lc_text = TABLE_HEADING_QUANTITY;

$lc_align = 'right';

break;

case 'PRODUCT_LIST_WEIGHT':

$lc_text = TABLE_HEADING_WEIGHT;

$lc_align = 'right';

break;

case 'PRODUCT_LIST_IMAGE':

$lc_text = TABLE_HEADING_IMAGE;

$lc_align = 'center';

break;

case 'PRODUCT_LIST_BUY_NOW':

$lc_text = TABLE_HEADING_BUY_NOW;

$lc_align = 'center';

break;

}

 

if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {

$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

}

 

$list_box_contents[0][] = array('align' => $lc_align,

'params' => 'class="productListing-heading"',

'text' => '?' . $lc_text . '?');

}

 

if ($listing_split->number_of_rows > 0) {

$rows = 0;

$listing_query = tep_db_query($listing_split->sql_query);

while ($listing = tep_db_fetch_array($listing_query)) {

$rows++;

 

if (($rows/2) == floor($rows/2)) {

$list_box_contents[] = array('params' => 'class="productListing-even"');

} else {

$list_box_contents[] = array('params' => 'class="productListing-odd"');

}

 

$cur_row = sizeof($list_box_contents) - 1;

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

$lc_align = '';

 

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$lc_align = '';

$lc_text = '?' . $listing['products_model'] . '?';

break;

case 'PRODUCT_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';

} else {

$lc_text = '?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>?';

}

break;

case 'PRODUCT_LIST_MANUFACTURER':

$lc_align = '';

$lc_text = '?<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a>?';

break;

case 'PRODUCT_LIST_PRICE':

$lc_align = 'right';

//***** START OF B2BSUITE

 

$customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");

$customer_group = tep_db_fetch_array($customer_group_query);

$customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $listing['products_id'] . "' and customers_group_id = '" . $customer_group['customers_group_id'] . "'");

if ( $customer_group['customers_group_id'] != 0) {

if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {

//$listing = "";

$listing['products_price'] = $customer_group_price['customers_group_price'];

}

}

//***** END OF B2BSUITE

$listing['specials_new_products_price'] = tep_get_products_special_price($listing['products_id']);//B2Bsuite

if (tep_not_null($listing['specials_new_products_price'])) {

//***** START OF B2BSUITE

$products_price_s = '?<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>?';

if (PRICES_LOGGED_IN == 'false') {

$product_price_d = $products_price_s;

}

if ((PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) {

$product_price_d = ('<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '">' . PRICES_LOGGED_IN_TEXT . '</a>?' );

} else {

$product_price_d = $products_price_s;

}

$lc_text = $product_price_d ;

} else {

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

if (PRICES_LOGGED_IN == 'false') {

$product_price_d = $products_price_s;

}

if ((PRICES_LOGGED_IN == 'true') && (!tep_session_is_registered('customer_id'))) {

$product_price_d = ('<a href="' . tep_href_link(FILENAME_LOGIN, '','SSL') . '">' . PRICES_LOGGED_IN_TEXT . '</a>?' );

} else {

$product_price_d = $products_price_s;

}

 

$lc_text = $product_price_d;

}

//****** END OF B2BSUITE

break;

case 'PRODUCT_LIST_QUANTITY':

$lc_align = 'right';

$lc_text = '?' . $listing['products_quantity'] . '?';

break;

case 'PRODUCT_LIST_WEIGHT':

$lc_align = 'right';

$lc_text = '?' . $listing['products_weight'] . '?';

break;

case 'PRODUCT_LIST_IMAGE':

$lc_align = 'center';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

} else {

$lc_text = '?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>?';

}

break;

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

//Master Products

if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>?';

} elseif ($listing['products_master'] != '0') {

$lc_text = '?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>?';

} else {

$lc_text = '?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>?';

}

//Master Products EOF

break;

}

 

$list_box_contents[$cur_row][] = array('align' => $lc_align,

'params' => 'class="productListing-data"',

'text' => $lc_text);

}

}

 

new productListingBox($list_box_contents);

} else {

$list_box_contents = array();

 

$list_box_contents[0] = array('params' => 'class="productListing-odd"');

$list_box_contents[0][] = array('params' => 'class="productListing-data"',

'text' => TEXT_NO_PRODUCTS);

 

new productListingBox($list_box_contents);

}

 

if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>

<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table>

<?php

}

?>

 

 

please advice before i continue!

 

thanks in advance

Share this post


Link to post
Share on other sites
anyone at all can help? been 3 days!

 

3 days already?! Tell me about it: service at this helpdesk is in one word 'abominable'. Recent refund requests for this package have also fallen onto deaf ears...

 

:blink:

 

if i changed the above line, my question: WILL IT HAVE ANY AFFECT ON MY CART?

 

Yes, any change will affect your cart/catalogue. For better or worse. But probably what you will want to hear is that you will have to make the same changes for B2B and MP to product_listing_col.php as done for product_listing.php.

Share this post


Link to post
Share on other sites

well well well,

 

php coding still light years away for me! better leave this contribution for now UNLESS someone out there with a heart of gold willing to show me how to cut and paste!

 

cheers

Share this post


Link to post
Share on other sites

I recently installed this contribution. Everything looks fine but I have one issue so far. When I add something to the cart and click checkout it brings me to login.php page and it does show me the additional section which states "

 

Do you want to go straight to the checkout process?

 

Would you like to check out without creating a customer account? Please note that all of our services will not be available to customers that do not wish to create an account. Also, you can not view the order status of your order, and each time you have to shop with us you will have to re-enter all of your data.

 

Creating an account is Free. If you still wish to continue to checkout please click the checkout button to your right."

 

 

I can see a button labeled Checkout. I have seen other sites that have this contribution installed and when you click on that button it will bring you to a page to fill out your name address etc. But for me when you put my mouse on the Checkout button it is showing me this url

 

https://www.grafitechic.com/shop/create_acc...php?guest=guest

 

but when I click on the button it takes me to the page that has the product on it where I can click on Update, Continue Shopping or Checkout. It does not behave the same way the other sites I have seen do.

 

Anyone have an idea what is happening? Just so you know this is the latest version of osCommerce with no previous installations of contributions.

 

 

 

and the page looks

Share this post


Link to post
Share on other sites
3 days already?! Tell me about it: service at this helpdesk is in one word 'abominable'. Recent refund requests for this package have also fallen onto deaf ears...

 

Yes, any change will affect your cart/catalogue. For better or worse. But probably what you will want to hear is that you will have to make the same changes for B2B and MP to product_listing_col.php as done for product_listing.php.

 

If you paid for it you got ripped off. This is an open source project, supported by its community. In other words, YOU are the help desk.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
hello,

 

i wanted to install this great contribution BUT have one concern: I have had other contributions added to my cart and the product_listing.php had been changed drastically (contribution i have included: B2B suite, Master Product).

 

The last instruction on the "install new_install" said:

 

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

In filenames.php change

 

define('FILENAME_PRODUCT_LISTING', 'product_listing.php');

 

to

 

define('FILENAME_PRODUCT_LISTING', 'product_listing_col.php');

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

if i changed the above line, my question: WILL IT HAVE ANY AFFECT ON MY CART?

 

my product_listing.php look like this:

 

please advice before i continue!

 

thanks in advance

 

Yes, of course it will have an effect on your cart. product_listing.php is the file, in a stock osCommerce installation, that controls the display of all your products. filenames.php is where you define what file that is, so if you change the definition of FILENAME_PRODUCT_LISTING then you could possibly see a huge difference in the way your products are displayed. That is, you know, the point of the contribution.

 

So anyway, for you to get this to work you will have to modify product_listing_col.php to work with Master Products and B2B.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
I recently installed this contribution. Everything looks fine but I have one issue so far. When I add something to the cart and click checkout it brings me to login.php page and it does show me the additional section which states "

 

and the page looks

 

You're in the wrong thread. Something is wrong with either your login.php file, your create_account.php file, or both. This contribution does not modify either of those files.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

Hi All,

I want to install this mod but I'mn not sure how to make the database part work.

I have got other mods installed and my last configuration id is 20. I'm not expert in SQL.

 

Can anyone guide me what should be replaced in the following command to make database part work?

My Last configuration_group Id is 20 and last configuration id is 30

 

 

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples column', 'PRODUCT_LIST_MULTIPLE', '0', 'Do you want to display the Multiple Quantity with Attributes column?', '8', '11', now());

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples with Buy Now column', 'PRODUCT_LIST_BUY_NOW_MULTIPLE', '0', 'Do you want to display the Multiple Quantity Buy Now with Attributes column?', '8', '12', now());

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Number of column per row', 'PRODUCT_LIST_NUMCOL', '3', 'How many columns per row to display?', '8', '13', now());

Share this post


Link to post
Share on other sites
Hi All,

I want to install this mod but I'mn not sure how to make the database part work.

I have got other mods installed and my last configuration id is 20. I'm not expert in SQL.

 

Can anyone guide me what should be replaced in the following command to make database part work?

My Last configuration_group Id is 20 and last configuration id is 30

 

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples column', 'PRODUCT_LIST_MULTIPLE', '0', 'Do you want to display the Multiple Quantity with Attributes column?', '8', '21', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples with Buy Now column', 'PRODUCT_LIST_BUY_NOW_MULTIPLE', '0', 'Do you want to display the Multiple Quantity Buy Now with Attributes column?', '8', '22', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Number of columns per row', 'PRODUCT_LIST_NUMCOL', '3', 'How many columns per row to display?', '8', '23', now());


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

Thank you.

I made databse to work.

 

I could manage to install but I'm not sure if it actually works at all?

I can see the entries in Admin panel and also I made usre that only one of entries is on as per install instruction, but I can't see my index page modified.

 

I changed to display 1 column per row but it didn't work.

 

Can anyone let me know what I can do to make sure that this mod is installed properly and how tomake it work?

 

My site is live SwamiPC www.SwamiPC.in.

 

I wanted to make the product listing on front page customised so that I can display the product which I want to display from various other categories (which I'll keep on adding in future). At present my front page displays all products in all categories.

 

Cheers

Share this post


Link to post
Share on other sites
Thank you.

I made databse to work.

 

I could manage to install but I'm not sure if it actually works at all?

I can see the entries in Admin panel and also I made usre that only one of entries is on as per install instruction, but I can't see my index page modified.

 

I changed to display 1 column per row but it didn't work.

 

Can anyone let me know what I can do to make sure that this mod is installed properly and how tomake it work?

 

My site is live SwamiPC www.SwamiPC.in.

 

I wanted to make the product listing on front page customised so that I can display the product which I want to display from various other categories (which I'll keep on adding in future). At present my front page displays all products in all categories.

 

Cheers

 

As I understand how 2.2 is supposed to work, if you choose 1 column per row then it will show the original unmodified layout. You should set it at 2 or 3 or 4 columns, etc, in order to see a change.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

I installed this contribution, and it works, but the price is listed twice... I've checked the settings and the product_listing_col.php, but didn't see anything...

 

Any idea?

 

Thanks in advance!

 

Plascual

Share this post


Link to post
Share on other sites
I installed this contribution, and it works, but the price is listed twice... I've checked the settings and the product_listing_col.php, but didn't see anything...

 

Any idea?

 

Thanks in advance!

 

Plascual

 

That's a new one. Maybe you've got some overlapping settings in Administration->Configuration->Product Listing?

 

Make sure you are following these instructions:

THIS IS IMPORTANT

A note about the toggle feature in admin-

You should only select one of the following three options in your admin->Configuration->Product Listing menu:

-Display Buy Now column

OR

- Display  Add Multiples column

OR

- Display Add Multiples with Buy Now column

ie, one should have a number (1 or greater) assigned to it and the others should both be set at zero.  Displaying more than one will make the page look weird, not function properly, etc


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
That's a new one. Maybe you've got some overlapping settings in Administration->Configuration->Product Listing?

 

Make sure you are following these instructions:

THIS IS IMPORTANT

A note about the toggle feature in admin-

You should only select one of the following three options in your admin->Configuration->Product Listing menu:

-Display Buy Now column

OR

- Display  Add Multiples column

OR

- Display Add Multiples with Buy Now column

ie, one should have a number (1 or greater) assigned to it and the others should both be set at zero.  Displaying more than one will make the page look weird, not function properly, etc

 

Thanks for your fast reply!

 

I've only put "Display Buy Now column" to "1" and the others are set to "0". I noted that it only repeats the last item. So if I put the last one (ex. Display Buy Now Column) to #4 then I get two Buy Now buttons... if I add product quantity as #5, then I get quantity twice.

 

I've checked configuration group #8 before running SQL, free slot began at #11, so it was ok.

 

Do you know if this piece of code could be doing this?

 

if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) {
	continue;
  }

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Great Contribution! I have it installed on a test store v2.2MS2 Update 051113 and it has been working great along with STS 4.1.

 

I really like to Thank the Creator of this Wonderful Contribution, you have saved me soo much time digging through codes :)

 

I did encounter 2 very minor problems with this contribution:

 

1. the 2nd and up rows had a different background than the first. (fixed it by removing the odd and even row background different in the stylesheet)

 

2. in Admin section, I see 3 rows of every setting this contribution adds, see the picture below for a better idea. And please dont shoot me if this was intended... :P

 

productlist.jpg

Share this post


Link to post
Share on other sites
Great Contribution! I have it installed on a test store v2.2MS2 Update 051113 and it has been working great along with STS 4.1.

 

I really like to Thank the Creator of this Wonderful Contribution, you have saved me soo much time digging through codes :)

 

I did encounter 2 very minor problems with this contribution:

 

1. the 2nd and up rows had a different background than the first. (fixed it by removing the odd and even row background different in the stylesheet)

 

This is a bug that was supposed to be addressed in v2.2. I actually haven't installed the new version yet so maybe I can't say for sure.

 

2. in Admin section, I see 3 rows of every setting this contribution adds, see the picture below for a better idea. And please dont shoot me if this was intended... :P

 

You ran the SQL command three times. You need to go into your database and manually delete the extra lines.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Do you know if this piece of code could be doing this?

 

if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) {
	continue;
  }

 

Thanks in advance!

 

I don't know. What happens if you comment it out?


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
I don't know. What happens if you comment it out?

It wasn't this... I found out around line 101 in product_listing_col.php :

Look for:

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

Change for:

for ($col=0, $n=sizeof($column_list); $col<$n-1; $col++) {

Possible that it was running through code one more time with the same last item, so I added "-1" to $col<$n;...

 

Now it works... but what do you think of this? Does it work okay on a clean install ?

 

Plascual

Share this post


Link to post
Share on other sites
You ran the SQL command three times. You need to go into your database and manually delete the extra lines.

 

fixed! thanks again :)

Share this post


Link to post
Share on other sites

1. First off, the database change.

Run the following command on your database:

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples column', 'PRODUCT_LIST_MULTIPLE', '0', 'Do you want to display the Multiple Quantity with Attributes column?', '8', '11', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples with Buy Now column', 'PRODUCT_LIST_BUY_NOW_MULTIPLE', '0', 'Do you want to display the Multiple Quantity Buy Now with Attributes column?', '8', '12', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Number of column per row', 'PRODUCT_LIST_NUMCOL', '3', 'How many columns per row to display?', '8', '13', now());

 

Be careful with this one. If you have made changed to your configuration table, the "11", "12", and "13" for sort_order will have to change depending on the last item with the configuration_group_id of "8"

 

I'm not sure I understand this warning?


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

I am having a problem with the product sort order. My goal is to have all of the products sorted by manufacturer name followed by product name (Ex. Sony AAA, Sony BBB, Sony CCC). I changed the following code in index.php:

 

if ($column_list[$i] == 'PRODUCT_LIST_MANUFACTURER') {

$HTTP_GET_VARS['sort'] = $i+1 . 'a';

$listing_sql .= "order by m.manufacturers_name";

 

This got all of the products in order by manufacturer name, but they are still not sorting by product name per each manufacturer name. It's doing something like this Sony BBB, Sony AAA, Sony DDD, Sony CCC. The only time it sorts correctly is when I click a results page, like results page 2 or even page 1. But each time I click a category, the products get scrambled again.

 

Any help would be GREATLY appreciated!

Edited by miketomrob

Share this post


Link to post
Share on other sites

I just noticed a major problem with my installation of this contribution.

 

I set my column numbers to 4, displaying 4 products per row.

 

When there aren't enough products to fill at least 1 row (in my case, less than 4 products for listing), there is a problem.

 

For example:

For 3 products

Instead of displaying the 3 products each with 25% of the total width + an empty cell of 25% width, I am getting 3 products each occupying 33% of the total width.

For 2 products:

Each product occupying 50% of the total width.

 

The above problem is making the product listing page very inconsistant. And I been trying to fix this problem without much succuss.

 

In the product_listing_col.php, there is an IF statement that supposely adds empty cells around Line 236

if ($x == ($no_of_listings -1)) {

		//BOF version 2.2 modification
		// fill up the remainder of the table row with empty cells, assumes three products per row!
		for($column=1; $column < $colnum; $column++) {
			$list_box_contents[$row][$column + 1] = array('align' => 'center',
											//bof product listing with attributes
											'valign' => $lc_valign,
											//eof product listing with attributes
											//2.2 modification ,add width in td
										  'params' => 'class="productListing-data" width="'.$tdsize.'%"',
										  'text'  => "");
		}

 

And from what I have learnt so far, the above code can't be working correctly, because the condition will never be met because $x and $no_of_listings are never initialized and don't holds any values.

 

I would really apprecaited it if someone can help me with this problem.

 

Thanks in advance

Share this post


Link to post
Share on other sites

I think I have a solution, and all that I need now is a way to find out the total number of products in this particular listing.

 

Any help will be greatly appreciated

Share this post


Link to post
Share on other sites
I think I have a solution, and all that I need now is a way to find out the total number of products in this particular listing.

 

Any help will be greatly appreciated

 

Nevermind that! I figured out the solution, and made the IF statement for the empty cell working, if anyone wants the code I will post it :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×