Thanx for the reply....wish I was more knowledgeable about this stuff most days LOL :)
Printable View
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.
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
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
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.
Like this:PHP Code:
} else { //gallery
$gallery_skip_now = 1;
$gallery_skips++;
} // /not_gallery
break;
case 'PRODUCT_LIST_QUANTITY':
PHP Code:
//} 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':
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 Code:
//} 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':
Hi Glenn,
Yes, it works now.
Thank you very much.
regards, anna