Forums / All Other Contributions/Addons / Column Layout Grid v2.x Support

Column Layout Grid v2.x Support

Started by gjh42 on 20 Sep 2012, 7:00 PM · Views: 30,576

Results 21 to 40 of 176
18 Nov 2012, 1:09 AM
#21
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Column Layout Grid v2.x Support

I have found that the vesion of tpl_modules_product_listing.php in the mod folder (and in the zip) does not include the last tweak I made to my test site version. This would account for blank list items; replacing this section in your copy of the file will correct the issue.

<?php
/**
 * load the list_box_content template to display the products
 */
if ($product_listing_layout_style == 'columns') {
  if (PRODUCT_LISTING_GRID_SORT) { 
    echo '<ul id="gridSorter">' . PRODUCT_LISTING_GRID_SORT_TEXT;
    for ($col=0;$col<sizeof($grid_sort);$col++) {
      if ($grid_sort[$col]['text']) echo '<li class="item">' . $grid_sort[$col]['text'] . '</li>';
    }
    echo '</ul>';
  }
```This line:
if ($grid_sort[$col]['text']) echo '<li class="item">' . $grid_sort[$col]['text'] . '</li>';
is what is changed to eliminate blank items.

I will update the mod in Plugins. I apologize for the inconvenience.
18 Nov 2012, 8:40 PM
#22
masterrusty avatar

masterrusty

Zen Follower

Join Date:
Mar 2007
Location:
Oregon
Posts:
152
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

That got rid of the space, and the duplicate, except when "Weight" is activated on the list. I don't want weight on the listing, so that doesn't bother me, but you might want to look into it.

Now, I notice that the Product Model Numbers are sitting right on top of the picture of the product immediately below the item they are for. It would be nice to have more space between, or even better, to put the model number on top of the related picture. Can I do that?

17 Years and still just a "Follower." :P

19 Nov 2012, 12:01 AM
#23
masterrusty avatar

masterrusty

Zen Follower

Join Date:
Mar 2007
Location:
Oregon
Posts:
152
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

I figured out how to move where the Model number gets placed in the stack. That also led me to find that the Duplicates Sort Headings were somehow resulting from a lack of pictures on the test site.

Not sure why the problem appeared to be with "Weight" only there, but when I tested locally, the duplicate heading was changing depending on how I stacked the information. That stopped when I turned off the non-existent images. Then when I loaded images, and turned them back on in the list, there was no problem.

17 Years and still just a "Follower." :P

25 Nov 2012, 6:06 PM
#24
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

Hello,

I'm have to do a manual install since I have already installed the Ceon URL Mapping mod. That mod already had me place a copy of tpl_index_product_list.php in the template folder. How can I get past that? Thanks

26 Nov 2012, 1:52 AM
#25
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

The only Column Grid code alteration to that file is this additionphp // display list/grid choice if (defined('PRODUCT_LISTING_LAYOUT_STYLE_CUSTOMER') and PRODUCT_LISTING_LAYOUT_STYLE_CUSTOMER == '1') { echo '<div id="viewControl">' . zen_draw_pull_down_menu('view', array(array('id'=>'rows','text'=>PRODUCT_LISTING_LAYOUT_ROWS),array('id'=>'columns','text'=>PRODUCT_LISTING_LAYOUT_COLUMNS)), (isset($_GET['view']) ? $_GET['view'] : (defined('PRODUCT_LISTING_LAYOUT_STYLE')? PRODUCT_LISTING_LAYOUT_STYLE: 'rows')), 'onchange="this.form.submit()"') . '</div>'; } which can be inserted in your copy immediately above this line:```php
// draw alpha sorter

26 Nov 2012, 2:33 PM
#26
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

Thanks! I appreciate the quick response!

14 Dec 2012, 2:13 PM
#27
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

gjh42:

Column Layout Grid for Product Listing v2.2 is now available in Plugins. Meanwhile, I have submitted v2.3 to fix a bug introduced with the list/grid sorter (see http://www.zen-cart.com/showthread.php?200854-Column-Layout-Grid-for-Product-Listing). The bug requires that another filter (alpha, manufacturer, etc.) be enabled in order for the list/grid sorter to display. V2.3 will not require this.

Hello, Seems we're having a problem with the manufacturer bug. We can't sort by manufacturer (the drop down is there, just doesn't work) and if there are no manufacturers, the grid/list selection doesn't show up.

We're using 1.5.0 and Col Layout Grid 2.31.

14 Dec 2012, 5:57 PM
#28
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

The CLG code added to tpl_index_product_list.php cannot interact with or affect (or be affected by) the manufacturers sorting in any way. All it does is cause the form to appear if list/grid sort is enabled, in addition to the other triggers, and display the list/grid dropdown. All of the sort displays within the form are independent of each other. Do you have this part in the top of the form area?```
if ($do_filter_list || ($check_for_alpha->RecordCount() > 0 && PRODUCT_LIST_ALPHA_SORTER == 'true') || (defined('PRODUCT_LISTING_LAYOUT_STYLE_CUSTOMER') and PRODUCT_LISTING_LAYOUT_STYLE_CUSTOMER == '1')) {//form if list/grid enabled
$form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';
?>

If you only followed the directions in post 25 on the CEON file, you would not get the full effect of the v2.3.1 file - that actually has two additions to the stock file, the post 25 one and the one here.
That still doesn't explain why the manufacturers sort wouldn't work.
14 Dec 2012, 6:48 PM
#29
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

gjh42:

The CLG code added to tpl_index_product_list.php cannot interact with or affect (or be affected by) the manufacturers sorting in any way. All it does is cause the form to appear if list/grid sort is enabled, in addition to the other triggers, and display the list/grid dropdown. All of the sort displays within the form are independent of each other. Do you have this part in the top of the form area?```
if ($do_filter_list || ($check_for_alpha->RecordCount() > 0 && PRODUCT_LIST_ALPHA_SORTER == 'true') || (defined('PRODUCT_LISTING_LAYOUT_STYLE_CUSTOMER') and PRODUCT_LISTING_LAYOUT_STYLE_CUSTOMER == '1')) {//form if list/grid enabled
$form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';
?>

> If you only followed the directions in post 25 on the CEON file, you would not get the full effect of the v2.3.1 file - that actually has two additions to the stock file, the post 25 one and the one here.
> That still doesn't explain why the manufacturers sort wouldn't work.

Looking at the page source, there isn't a closing form tag. I'll look for the file and add that or see what's up. Maybe that will fix the whole thing. I'll let you know.

<form name="filter" action="http://192.168.1.117/menstore/jewelry/fox" method="get"><label class="inputLabel">Filter Results by:</label><input type="hidden" name="sort" value="20a" /><select name="filter_id" onchange="this.form.submit()"> <option value="" selected="selected">All Categories</option> <option value="10">Action</option> <option value="22">Big Linked</option> <option value="12">Comedy</option> <option value="15">Drama</option> <option value="3">DVD Movies</option> </select> ```
14 Dec 2012, 7:02 PM
#30
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

The </form>, I believe unchanged from stock, is after the alpha filter:```php
// draw alpha sorter
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING_ALPHA_SORTER));
?>

</form> ```

Can you let me see the site?

14 Dec 2012, 7:32 PM
#31
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

gjh42:

The </form>, I believe unchanged from stock, is after the alpha filter:```php
// draw alpha sorter
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING_ALPHA_SORTER));
?>

</form> ``` > > Can you let me see the site?

Wish I could but it's on my hard drive. I'm running Apache on my computer to develop the site. Any way I could edit out the ip and path in my last post?

I see that form tag. It's there. Must be something else.

14 Dec 2012, 8:21 PM
#32
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

You can only edit posts for seven minutes. After that, if it is really important, you can ask one of the moderators to do it.
If the ip address and path will let others get to your site, why can't you let me see it?

Did you verify that you have the addition to the if() statement? Does that part (independence from manufacturers filter) work correctly now?

14 Dec 2012, 9:13 PM
#33
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

gjh42:

You can only edit posts for seven minutes. After that, if it is really important, you can ask one of the moderators to do it.
If the ip address and path will let others get to your site, why can't you let me see it?

Did you verify that you have the addition to the if() statement? Does that part (independence from manufacturers filter) work correctly now?

It's installed on my local hard drive so it can't be viewed by the public until I upload it to a server. I have XAMPP on my local computer.

All of the above is verified.

14 Dec 2012, 9:18 PM
#34
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

Then the filepath in your post should be irrelevant to security.

Does that part (independence from manufacturers filter) work correctly now?

14 Dec 2012, 9:38 PM
#35
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

gjh42:

Then the filepath in your post should be irrelevant to security.

No. I'm still looking for a place to add the </form> tag. Looking at the source of the page, it seems that the ending form tag is missing from the first dropdown and the beginning form tag is missing from the second one that controls the grid. See below:

<form name="filter" action="http://192.168.1.117/menstore/jewelry/big-linked" method="get"><label class="inputLabel">Filter Results by:</label><input type="hidden" name="sort" value="20a" /><select name="filter_id" onchange="this.form.submit()">
  <option value="" selected="selected">All Manufacturers</option>
  <option value="4">Fox</option>
  <option value="8">GT Interactive</option>
  <option value="9">Hewlett Packard</option>
  <option value="7">Sierra</option>
  <option value="3">Warner</option>
</select>

<div id="viewControl"><select name="view" onchange="this.form.submit()">
  <option value="rows">List</option>
  <option value="columns" selected="selected">Grid</option>
</select>
</div></form>

I just need to find where to add them.

15 Dec 2012, 3:49 PM
#36
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

You don't want to add those tags. It is all one form for sorters; whichever sorter is clicked will trigger form submission and processing of that sorting method.

16 Dec 2012, 1:31 PM
#37
fisherman avatar

fisherman

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: Column Layout Grid v2.x Support

gjh42:

You don't want to add those tags. It is all one form for sorters; whichever sorter is clicked will trigger form submission and processing of that sorting method.

I see.

We looked around and lots of people are having the same problem with the manufacturer sorting. The only one we've found that have made both grid and manuf sort work together are the ones who made this template: Scuro Template So I'm going through it to compare. Don't really know what I'm looking for though.

16 Dec 2012, 4:27 PM
#38
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

From the date of that template, I expect it is using the original (v1.3.8) version of Column Grid, which is much simpler and has no sorting modifications from stock. So it is not really relevant to the issue. (It is compatible with v1.5.x, even though product_liating.php changed; the change was minor and it still functions as it used to.) I'll do some testing of mfr sort vs. list/grid sort to see if I can find a conflict.

16 Dec 2012, 5:35 PM
#39
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

In my test site (with the demo products), the manufacturers filter works correctly, and the list/grid sorter works with or without the manufacturers filter enabled. So the question is, how is your site different from stock, aside from Column Grid?

16 Dec 2012, 5:43 PM
#40
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Column Layout Grid v2.x Support

I still haven't gotten a definite answer: does the list/grid sorter work independently of the manufacturers filter now for you?