Catalog Grid Display Module

Contrib type: 
Module
Status: 
Uploaded for testing
Moderation: 
Not ready for moderation

Downloads

Latest version: 
1.0
Compatibility: 
Ubercart 1.x

This is a module that will alter the display of your catalog into a grid.

To Install: unzip the attached zip file into your modules folder.

It is easily configurable from the regular ubercart catalog settings page here...
admin/store/settings/catalog/edit
where you can turn it on or off, set the width of the grid, and optionally display the title, sell price, and add to cart form on each product.


PreviewAttachmentSize
uc_catalog_grid.zip3.48 KB
Chris R (not verified)
Chris R's picture
Re: Catalog Grid Display Module

I had been using Views to achieve something similar to this but scrapped that page to go with this. Creates a great view and the Add to Cart option is a welcome addition.

Thanks!

phoenix0783's picture
Offline
Joined: 08/07/2007
Juice: 185
Re: Catalog Grid Display Module

I had achieved this with views, but was having some minor problems. Thank you very much for this module!

jimijamesi's picture
Offline
Joined: 08/19/2007
Juice: 75
very nice grid action

Hey fully fantastic.... I am however at a loss regarding how to change the number of product nodes shown per page. (Usually this is specified in views but since this module does not use a view....) im sure there was something in the admin menus somewhere....hmmm
thanks great grids!

p.s. btw floating grids would be a cool option too... float number accross based on borders of browser window... just a thought...

Lyle directed me to:
Store administration > Configuration > Product settings

/admin/store/settings/products

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Excellent module, It could

Excellent module,

It could be great to add an option to show or not the node teaser too..

Thank you again for this module !

zmove

Insurrectus's picture
Offline
Spreading the word - Ubercart for president.
Joined: 08/22/2007
Juice: 364
Getting An Error On Category Pages

warning: Illegal offset type in isset or empty in XXXXX\modules\taxonomy\taxonomy.module on line 1172

warning: Illegal offset type in isset or empty in XXXXX\modules\taxonomy\taxonomy.module on line 1173

warning: Illegal offset type in isset or empty in XXXXX\modules\taxonomy\taxonomy.module on line 1176

Any ideas? If I disable this module then no error. The Grid is working.

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
illegal offset -> change your code

I'm not a programer but I was able to fix it:

got to \modules\taxonomy\ and open taxonomy.module
find that lines at about 1172
function taxonomy_get_term($tid) {
static $terms = array();

if (!isset($terms[$tid])) {
$terms[$tid] = db_fetch_object(db_query('SELECT * FROM {term_data} WHERE tid = %d', $tid));
}

return $terms[$tid];
}

and change it to:
function taxonomy_get_term($tid) {
static $terms = array();

if (!isset($terms[(string)$tid])) {
$terms[(string)$tid] = db_fetch_object(db_query('SELECT * FROM {term_data} WHERE tid = %d', $tid));
}

return $terms[(string)$tid];
}

for me this is working, hope for u2.

Insurrectus's picture
Offline
Spreading the word - Ubercart for president.
Joined: 08/22/2007
Juice: 364
This did the trick.

Thanks.

arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
now with cck fields

Hello,

I've been upgrading this module a bit because I needed to add a few new fields to the grid. So

please take a look and let me know what you think...this is what I added:

allows you to display in the catalog grid, cck fields from the product type.
it adds in the catalog configuration checkboxes for each product cck fields, so you can choose what to display in the grid and what not.

Also the fields are sorted as such:

1 - link + product name
2 - product image
3 - cck fields ordered according the field weight
4 - add to cart button.

that's it...pretty simple. Oh..now it requires cck to run too.

So, if someone could take a look and let me know what the proccess of adding this to the contributions...I don't want to take to much credit for this because 90% of the module was already there.

Idan

AttachmentSize
uc_catalog_grid.zip 6.84 KB
StephenGWills's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik
Joined: 08/07/2007
Juice: 415
Re: now with cck fields

So, to clarify this contribution in my own mind and perhaps in others. Do we now have two separate ways to im plement a product grid? One is this uc_catalog_grid module and the other is Bwv's views solution in several parts?

Insurrectus's picture
Offline
Spreading the word - Ubercart for president.
Joined: 08/22/2007
Juice: 364
Update to Ubercart

I just updated ubercart with bazaar (09/26/2007, 10:00AM GMT-6) and now this module will not work. No errors, just no grid displayed. I've run update.php.

Any ideas?

avolve's picture
Offline
Joined: 09/14/2007
Juice: 47
Re: now with cck fields

I have just downloaded the latest version (sept 25) - thank you for putting it together

Is it possible to edit the grid view so that the product image is the thickbox imagecache preset - or does this require changes to the catalog settings? If it requires changes to the catalog settings, can someone give me a pointer as i can't work it out.

I have recreated this with a custom view (bonus grid) minus the css incorporated into your module (can o this when i create my theme). As a suggestion, i think providing an option to choose a preferred imagecache preset (rather than just the product image) would be a good improvement - in my case, i have created another size specific to my project.

ps, i have the same errors as Insurrectus and whilst i am sure that snicers code will resovle this, i would prefer not to hack the Taxonomy module (problems with updates, etc).

cheers
c.

Olivier Lemire (not verified)
Chris R's picture
Wrong patch!

I am having the same issue with taxonomy. With my knowledge with drupal and php, I strongly suggest not to use snicers solution as it is a patch to drupal core module. This would really become a problem if you forget about it and try to upgrade drupal. It seems the grid module is giving array as $tid param to the taxonomy_get_term function, the real solution, if it would be to patch taxonomy module would be to add this like before the conditional block:

<?php
 
if (is_array($tid)) {return false;}
?>

BUT!!!! I need to understand the grid module to find out where the call to taxonomy_get_term function is and then apply my patch before the function is called.

Thanks!

robdinardo@drupal.org (not verified)
Chris R's picture
worked, but edit core?

Thanks. It worked for me too. But as the previous poster mentioned, that would be changing Drupal core.

jorditr's picture
Offline
Getting busy with the Ubercode.
Joined: 10/31/2007
Juice: 256
I blended it with uc_catalog.module, see the forum link

Hi you all.

I posted several days ago a modified uc_catalog.module using the useful code I found on uc_catalog_grid.module. It works, it has no problems regarding taxonomy.module, it reorganizes the catalog settings page for having more sense, and solves it all with just one module. Have a look at http://www.ubercart.org/forum/ideas_and_suggestions/1600/uc_catalog_modu... grab the module and see if it works for you, there are more details on that forum message.

I've just mixed the code I've found so thanks to the ones that provided the code Smiling

jorditr's picture
Offline
Getting busy with the Ubercode.
Joined: 10/31/2007
Juice: 256
New versions

Hi you all.

I've improved the code with new additions and upgraded it to alpha8 on the same thread that previous comment. Have it a check and send your impressions Smiling

Perhaps's picture
Offline
Joined: 08/25/2007
Juice: 4
This is my guess

I would guess that previous versions of ubercart did not have the category name on the URL line. So instead of $args having only one value, it now has two.

So I switched out line 79 of uc_catalog_grid.module for this:

$catalog = uc_catalog_get_page($args[0]);

The addition is in bold.

popscythe's picture
Offline
Joined: 12/27/2007
Juice: 38
Example?

I installed this module to try to get my catalog products to appear as the catagories of the catalog appear... in a grid type format. But after installing it, I wonder what it was supposed to do, heh.

Does someone have a link to what a page using this module is supposed to look like?

darkbrewery's picture
Offline
Joined: 02/09/2008
Juice: 49
Differance?

So What's the differance between this and using the Views bonus pack and Panels?

andrejusc's picture
Offline
Joined: 04/04/2008
Juice: 12
Why product fields weight is not reflected?

I don't see anything related to product fields weight inside theme_uc_catalog_product_grid. Why?

Greg's picture
Offline
Joined: 08/24/2008
Juice: 8
Re: Catalog Grid Display Module

When I check display items in grid, then click on my categories all I get is this error. When I google the error All I get are a TON of pages with the same broken category page. Does this module not work anymore?

Fatal error: Call to undefined function uc_catalog_term_path() in /var/www/orderonline/sites/all/modules/uc_catalog_grid/uc_catalog_grid.module on line 88

mach5_kel's picture
Offline
Joined: 03/25/2008
Juice: 79
Any Luck

Anyone have any luck with this Mod and the newest version of Ubercart? If it needs to be updated, I am willing to throw some money it.

- Mach5

fang27's picture
Offline
Joined: 01/30/2008
Juice: 121
Confused.....

I am a little confused as to where I adjust the size of the product picture that appears in the grid....can anyone help?

Thanks!

Ole Martin's picture
Offline
Joined: 01/31/2008
Juice: 18
Upgrade to drupal 6?

Will this module be upgraded to Ubercart 2.x Wed Drupal 6 ?

make-online-shop's picture
Offline
Joined: 01/01/2011
Juice: 514
Re: Catalog Grid Display Module

Grid catalog module for Drupal 6 Ubercart 2 ?

Hello,

Is there a Drupal 6 Ubercart 2 version of this module ?

Or can you tell me how i could achieve to show more catalog products, and in a grid, without this module ?

Thank you so much.