Zen Cart Logo
Forums / All Other Contributions/Addons / Gallery Category support thread

Gallery Category support thread

Locked

Views: 5,253

Results 21 to 27 of 27
This thread is locked. New replies are disabled.
13 Aug 2008, 8:23 PM
#21
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Gallery Category support thread

gjh42:

Christon -

Gallery Category can only affect listings that display according to category. The All listing does not reference category at all, so cannot be affected by this. It would take a much more comprehensive mod.
The New centerbox can be restricted to a category, so may be possible to affect, but the New listing (as far as I recall) does not have any such possibility.

Thanx for the reply....wish I was more knowledgeable about this stuff most days LOL :)

14 Aug 2008, 6:23 AM
#22
gjh42 avatar

gjh42

Black Belt

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

Re: Gallery Category support thread

There is an approach that might work for the All and New listings. Its execution is more advanced than my current PHP skills, but someone good with database queries could probably do it easily.

Each product has a master category that it belongs to, and the code could be modified to look that up while getting other product info. Once the master category is known, it could be used to alter the product's display output if it matches the gallery id.

14 Aug 2008, 10:30 PM
#23
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Gallery Category support thread

Unfortunately I think that's beyond my limited database skills LOL what I have managed to achieve so far is sheer fluke I reckon LOL

23 Sep 2008, 4:20 PM
#24
anniti avatar

anniti

New Zenner

Join Date:
May 2008
Posts:
33
Plugin Contributions:
0

Re: Gallery Category support thread

Hi Glenn,
I'm trying to use the Gallery Category WITH the price shown in both product_listing- and product_infopages.

The product_infopage is alright, but after I
deleted/ uncommented the lines you advice in your original product_listing.php;

case 'PRODUCT_LIST_PRICE':
// if($not_gallery) { //delete this line for price to be displayed in gallery
$lc_text = TABLE_HEADING_PRICE;
$lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
$zc_col_count_description++;
// } else { //delete these 4 lines for price to be displayed in //gallery
// $gallery_skip_now = 1; //gallery
// $gallery_skips++; //gallery
// } // /not_gallery
break;

case 'PRODUCT_LIST_PRICE':
// if($not_gallery) { //delete this line for price to be displayed in gallery
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;
if($not_gallery) { //uncomment this line for price to be displayed in gallery
// more info in place of buy now

the price won't show up.

Any idea, thanks, anna

25 Sep 2008, 6:36 AM
#25
gjh42 avatar

gjh42

Black Belt

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

Re: Gallery Category support thread

Sorry, the instructions are incomplete in that area. Are you getting the "Price" heading in the product listing? You should be, by what you show of your code.
The actual price hide/display code needs more lines commented out around line 175, completing the removal of the

// if($not_gallery) {

started around line 132.

        }  else { //gallery
		  $gallery_skip_now = 1; 
		  $gallery_skips++;
		} // /not_gallery
        break;
        case 'PRODUCT_LIST_QUANTITY':

Like this:

        //}  else { //delete these 4 lines for price to be displayed in //gallery
		//  $gallery_skip_now = 1; 
		//  $gallery_skips++;
		//} // /not_gallery
        break;
        case 'PRODUCT_LIST_QUANTITY':
25 Sep 2008, 10:22 AM
#26
gjh42 avatar

gjh42

Black Belt

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

Re: Gallery Category support thread

It's been a long time since I looked at this mod.
The code above is not quite right; the original version would still skip the whole price/add output block when modified to show price in the listing, because the logic in the 4 lines controls the skip independently of the earlier line change restoring the price to the output.

The proposed change cuts out too much and would cause an error.

So the skip needs to be eliminated at all times, while leaving the end of the"if" block closed with }.
Change the section above to look like this:```php
//} else { //gallery - delete these 3 lines for price to be displayed in gallery
// $gallery_skip_now = 1;
// $gallery_skips++;
} // /not_gallery
break;
case 'PRODUCT_LIST_QUANTITY':

26 Sep 2008, 8:38 AM
#27
anniti avatar

anniti

New Zenner

Join Date:
May 2008
Posts:
33
Plugin Contributions:
0

Re: Gallery Category support thread

Hi Glenn,
Yes, it works now.
Thank you very much.
regards, anna