Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Removing Product page

Removing Product page

Locked

Views: 3,039

Results 1 to 20 of 27
This thread is locked. New replies are disabled.
27 Feb 2008, 1:59 AM
#1
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Removing Product page

Hey guys,

I am trying to removing the link on the product title that forwards to the product description page. How would I go about doing that?

Maybe edit the product_listing.php?

I want dont want my customers going to this page and the pages like that.(the product description page)

I want them to be able to add their items to the cart from this page

Any Ideas?

27 Feb 2008, 12:13 PM
#2
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Removing Product page

You would need to edit your includes/product_listing.php

27 Feb 2008, 3:46 PM
#3
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Removing Product page

Thanks Marg for the prompt reply. I've highlighted the code that I was editing to get the link to that page to go away. Is there a way I can allow the product description to appear in only certain categories?

case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
} else {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
}
break;

27 Feb 2008, 3:55 PM
#4
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Removing Product page

case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<h3 class="itemTitle">' . $listing->fields['products_name'] . '</h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_g et_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
} else {
$lc_text = '<h3 class="itemTitle">' . $listing->fields['products_name'] . '</h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_g et_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
}
break; 
27 Feb 2008, 4:24 PM
#5
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Removing Product page

:clap:Thanks Marg!

One last question... I followed some tutorials on the forum trying to get the price and the qty box put into 2 separate fields but for some reason when I edit the stylesheet I cant get the price to appear on the right side of the qty box. Im trying to achieve this effect.

Can't I do that editing this:

// qty box with add to cart button
if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
$lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
} else {
$lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
}
}
}
$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_align = 'right';
    $lc_text = $listing->fields['products_quantity'];
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_align = 'right';
    $lc_text = $listing->fields['products_weight'];
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_align = 'center';
    if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
      $lc_text = '';
    } else {
      if (isset($_GET['manufacturers_id'])) {
        $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
      } else {
        $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
      }
    }
    break;
  }

  $list_box_contents[$rows][$col] = array('align' => $lc_align,
                                          'params' => 'class="productListing-data"',
                                          'text'  => $lc_text);
}
27 Feb 2008, 4:56 PM
#6
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Removing Product page

               $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" /> - $lc_price";

You may need to make the Admin/product listing/Display Product Price/Add to Cart Column Width wider so it will fit.

27 Feb 2008, 5:23 PM
#7
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Removing Product page

hmm... I got it! So Im trying to remove the other price. It is still displaying above qty box. I tried removing it but it corrupted the page. I am very limited in my PHP skills.

// hide quantity box
if ($listing->fields['products_qty_box_status'] == 0) {
$lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
} else {

$lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type="text" name="products_id[" . $listing->fields['products_id'] . "]" value="0" size="4" /> - $lc_price";
}
} else {

27 Feb 2008, 5:32 PM
#8
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Removing Product page

Replace```
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = '$lc_price';

With```
        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  '';
27 Feb 2008, 5:40 PM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: Removing Product page

To remove the original price display, just change this line:

$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';

to this:

$lc_price = '';

        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  $lc_price;

        // more info in place of buy now
        $lc_button = '';
        if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
          $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        } else {
          if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
            if (
                // not a hide qty box product
                $listing->fields['products_qty_box_status'] != 0 &&
                // product type can be added to cart
                zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
                &&
                // product is not call for price
                $listing->fields['product_is_call'] == 0
                &&
                // product is in stock or customers may add it to cart anyway
                ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
              $how_many++;
            }
            // hide quantity box
```You don't want to touch the code you indicated just below the // hide quantity box.

Marg's solution will work the same.
27 Feb 2008, 5:53 PM
#10
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Removing Product page

He wants the price to show up in a different place so you can't remove that line. Just do as I said before.
Marg

27 Feb 2008, 5:53 PM
#11
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Removing Product page

Thanks guys for all the feedback!

Just to clarify things, I am not trying to remove the price. I would to

A. Separate the price and qty into 2 different fields

B. Make it appear like it is 2 different fields

27 Feb 2008, 6:00 PM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Removing Product page

Do you mean two separate headings in the list and everything? That would be significantly more complicated, though it could be done easily by hacking one of the fields you don't want to use in the listing like say manufacturer or weight.

And yes, you're right, Marg. Using the simple value of $lc_price elsewhere would be more comprehensible than moving the whole retrieval code.

27 Feb 2008, 6:10 PM
#13
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Removing Product page

Do you mean two separate headings in the list and everything?

Yes

That would be significantly more complicated, though it could be done easily by hacking one of the fields you don't want to use in the listing like say manufacturer or weight.

Since Im never going to have the weight field displayed, I might as well.

So what do I need to do first?

27 Feb 2008, 6:16 PM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: Removing Product page

In this section:

        case 'PRODUCT_LIST_WEIGHT':
        $lc_align = 'right';
        $lc_text = $listing->fields['products_weight'];
        break;

Change the code to this:```php
case 'PRODUCT_LIST_WEIGHT':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;
break;

You will also want to change the text of the header in the language definition file so it says Price instead of Weight.
27 Feb 2008, 6:43 PM
#16
gjh42 avatar

gjh42

Black Belt

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

Re: Removing Product page

I'd have to see exactly what you changed in the original price block to advise on how to fix that. You don't have the multiple quantity with top/bottom add buttons enabled, do you?

To change the text, search for it in Tools > Developers Toolkit and you will see the filename and line number where it is defined.

27 Feb 2008, 6:58 PM
#17
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Removing Product page

case 'PRODUCT_LIST_PRICE':
$lc_price = '';
$lc_align = 'right';
$lc_text = $lc_price;

    // more info in place of buy now
    $lc_button = '';
    if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
      $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
    } else {
      if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
        if (
            // not a hide qty box product
            $listing->fields['products_qty_box_status'] != 0 &&
            // product type can be added to cart
            zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
            &&
            // product is not call for price
            $listing->fields['product_is_call'] == 0
            &&
            // product is in stock or customers may add it to cart anyway
            ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
          $how_many++;
        }
        // hide quantity box
        if ($listing->fields['products_qty_box_status'] == 0) {
          $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
        } else {
          $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
        }
      } else {

// qty box with add to cart button
if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
$lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
} else {
$lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
}
}
}
$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$lc_text .= '' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_align = 'right';
    $lc_text = $listing->fields['products_quantity'];
    break;
     case 'PRODUCT_LIST_WEIGHT':
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    $lc_align = 'right';
    $lc_text =  $lc_price;
    break;  
    case 'PRODUCT_LIST_IMAGE':
    $lc_align = 'center';
    if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
      $lc_text = '';
    } else {
      if (isset($_GET['manufacturers_id'])) {
        $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
      } else {
        $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
      }
    }
    break;

Here is what I've got in the product listing file. I do have the top/bottom add buttons enabled on the admin side. Im not sure where the error is.

27 Feb 2008, 7:26 PM
#18
gjh42 avatar

gjh42

Black Belt

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

Re: Removing Product page

If you have the top/bottom add buttons enabled, then you are not supposed to have a button on each product. I don't know why the top/bottom buttons won't show.
The code for the multiple add buttons is elsewhere in that file (at the bottom).

27 Feb 2008, 7:49 PM
#19
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Removing Product page

I do you want the add to cart buttons at the top and bottom of the page not on each product. Even though its enabled it isnt showing. Im not quite sure which part of the code it is...

$list_box_contents[$rows][$col] = array('align' => $lc_align,
'params' => 'class="productListing-data"',
'text' => $lc_text);
}

// add description and match alternating colors
//if (PRODUCT_LIST_DESCRIPTION > 0) {
//  $rows++;
//  if ($extra_row == 1) {
//    $list_box_description = "productListing-data-description-even";
//    $extra_row=0;
//  } else {
//    $list_box_description = "productListing-data-description-odd";
//    $extra_row=1;
//  }
//  $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"',
//  'text' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION));
//}
$listing->MoveNext();

}
$error_categories = false;
} 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);

$error_categories = true;
}

if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) {
$show_top_submit_button = true;
} else {
$show_top_submit_button = false;
}
if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) {
$show_bottom_submit_button = true;
} else {
$show_bottom_submit_button = false;
}

if ($how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) {
// bof: multiple products
echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'), 'post', 'enctype="multipart/form-data"');
}

?>

27 Feb 2008, 8:03 PM
#20
gjh42 avatar

gjh42

Black Belt

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

Re: Removing Product page

There are several conditions that have to be met for the top/bottom buttons to show:```php
if ($how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0)

$how_many needs to be > 0,
PRODUCT_LISTING_MULTIPLE_ADD_TO_CART needs to be non-zero,
$show_submit needs to be true, and
$listing_split->number_of_rows needs to be > 0.

One of the edits you made in the price block may have knocked out one of them. Try a fresh copy of product_listing.php and paste just the latest edits into it. This would be easier than combing the file for stray changes.