Site maintenance: Tuesday 17 Nov, from 10:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Bug Reports / [Done 1.3.6] Want to Turn Off Buy Now in Search Results

[Done 1.3.6] Want to Turn Off Buy Now in Search Results

Locked

Started by bettysue on 1 Oct 2006, 11:37 PM · Views: 1,719

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
1 Oct 2006, 11:37 PM
#1
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

[Done 1.3.6] Want to Turn Off Buy Now in Search Results

Hi,

Hopefully this is an Admin setting issue.

I don't want Buy Now buttons showing up anywhere in this v1.35 (uograded from 1.302) store.

I thought I had it fixed by changing the setting in the product edit:

Product Quantity Box Shows to Yes

However when doing a search, all the products returned have the buy now button turned on.

I can't seem to find where to change this (if it can be changed).

thank you,

betty

2 Oct 2006, 12:07 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.6] Want to Turn Off Buy Now in Search Results

There are numerous places for this ...

Do you mean on the Product Listing via the Cat box and the Search? Or just the Categories sidebox or what?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Oct 2006, 12:12 AM
#3
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: [Done 1.3.6] Want to Turn Off Buy Now in Search Results

Thank you for the quick response Ajeh!

The Buy Now buttons that are on the products found during the search function.

i.e. if you go here: http://www.jacksbargainbin.com/

and in the search box (right sideboxes) you enter the search term Sony, all the products shown in the search results have the Buy Now button.

I hope that is what you need for info, if not please let me know what else you need.

betty

2 Oct 2006, 1:07 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.6] Want to Turn Off Buy Now in Search Results

Okay ... let's try this and see if it is enough to get you fixed ...

/includes/modules/pages/advanced_search_results/header_php.php

Around lines 202 - 204 change to read:

//  $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price ";
$select_str = "SELECT DISTINCT " . $select_column_list .
              " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status ";

An associated fix depending on settings ...

Edit the file:
/includes/modules/product_listing.php

Around lines 138 to 143 change to read:

// 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>';
            }

See if that fixes you up and let me know ... :smile:

Moving to Bug Reports ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Oct 2006, 1:18 AM
#5
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: [Done 1.3.6] Want to Turn Off Buy Now in Search Results

Thank you very much Ajeh!! Your fix worked like a charm!

You mean for once one of my whinings was a real bug?!?

Again Ajeh, thank you for the quick replies and solution.

betty

2 Oct 2006, 1:21 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.6] Want to Turn Off Buy Now in Search Results

unfortunately ...

more unfortunately a bug or oversight of my own doing ... :cry:

Added in that neat new option for the individual quantity box and add to cart button per product and missed that the search was missing a field ... :rolleyes:

Cannot wait until we have these peices parts all tied in together to break them out better ... :lamo:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Oct 2006, 1:47 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.6] Want to Turn Off Buy Now in Search Results

Thanks for the update! :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!