Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Aug 2013
    Location
    United States
    Posts
    73
    Plugin Contributions
    0

    Default Help with call for price and add to cart buttons

    I am in need of being able to disable the add to cart buttons, and buy now buttons and quanitity boxes when an item is call for price or replacing it with call for price text, I was looking in my product_listing.php file and found this code

    PHP Code:
    qty box with add to cart button
                
    if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
                  
    $lc_buttonzen_draw_form('cart_quantity'zen_href_link($_GET['main_page'], 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" class="m-wrap"/>' zen_draw_hidden_field('products_id'$listing->fields['products_id']) . '<br /><button type="submit" class="button large">'.BUTTON_IN_CART_ALT.'</button></form></div>';
                } else {
                  
    $lc_button '<a class="button large" href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' $listing->fields['products_id']) . '">' BUTTON_IN_CART_ALT '</a>';
                }
              } 
    and was starting to try to toy with it but am not sure I am on the right track this is what I was thinking but I do not think it is coded correctly and also am not sure if it is in the right file or not

    PHP Code:
    qty box with add to cart button
              
    if $listing->fields['product_is_call'] == || PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT == '1')
                   else {
                    if (
    PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
                  
    $lc_buttonzen_draw_form('cart_quantity'zen_href_link($_GET['main_page'], 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" class="m-wrap"/>' zen_draw_hidden_field('products_id'$listing->fields['products_id']) . '<br /><button type="submit" class="button large">'.BUTTON_IN_CART_ALT.'</button></form></div>';
                } else {
                  
    $lc_button '<a class="button large" href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' $listing->fields['products_id']) . '">' BUTTON_IN_CART_ALT '</a>';
                }
              } 

  2. #2
    Join Date
    Aug 2013
    Location
    United States
    Posts
    73
    Plugin Contributions
    0

    Default Re: Help with call for price and add to cart buttons

    I noticed if I turn on showcase mode it adds a contact us box instead of a add to cart box, does anyone know if I can right a rule and insert it somewhere to do the same thing except if product is call for price then show contact us instead of add to cart, and if product is not call for price then show add to cart?

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Help with call for price and add to cart buttons

    I'm not sure what the question is. By default, if a product is set to call For Price, the Add to Cart box is not displayed for that product.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Help with call for price and add to cart buttons

    Quote Originally Posted by jwaynehinkle View Post
    I noticed if I turn on showcase mode it adds a contact us box instead of a add to cart box, does anyone know if I can right a rule and insert it somewhere to do the same thing except if product is call for price then show contact us instead of add to cart, and if product is not call for price then show add to cart?
    So what I see is that if a product is set as call for price, the image call for price is displayed , and the price is displayed with the add to cart button redirected to the contact us page (which if populated would contain the phone number). The only further issue I see is that at least in my setup, the price is still displayed... I would have thought that the price would be hidden in a call for price situation, but perhaps thaat is the code that needs to be modified: if a product is call for price, wherever the price is to be displayed then either nothing is returned or the statement call for price is provided. I think that the area you were looking in is the wrong place considering the change to the product page when the prodict is set to call for price.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Help with call for price and add to cart buttons

    I guess the price could be left blank and that would prevent such price display.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Aug 2013
    Location
    United States
    Posts
    73
    Plugin Contributions
    0

    Default Re: Help with call for price and add to cart buttons

    in my store this does not happen, please see this link http://bullysperformance.com/1500-8f...24129-211.html all of my call for price items are like this.

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Help with call for price and add to cart buttons

    Quote Originally Posted by mc12345678 View Post
    I guess the price could be left blank and that would prevent such price display.
    That's the way I did it.

  8. #8
    Join Date
    Aug 2013
    Location
    United States
    Posts
    73
    Plugin Contributions
    0

    Default Re: Help with call for price and add to cart buttons

    If I set the price to 0 it allows you to still add to cart in my store and it adds it for $0

  9. #9
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Help with call for price and add to cart buttons

    Please provide a link to a Call for Price product on your site.

  10. #10
    Join Date
    Aug 2013
    Location
    United States
    Posts
    73
    Plugin Contributions
    0

    Default Re: Help with call for price and add to cart buttons


 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v151 Display "add to cart" and "Call for price together"
    By Tadj Hemingway in forum General Questions
    Replies: 2
    Last Post: 6 Mar 2015, 07:53 PM
  2. call for price - add to cart
    By balihr in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 7 Jan 2010, 08:46 AM
  3. Help with main background, add to cart buttons and others
    By MommyMilk® in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 28 Apr 2008, 03:36 AM
  4. Call for price and add to cart
    By Outlawlb in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 19 Feb 2007, 05:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR