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_button= zen_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'] == 1 || PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT == '1')
else {
if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
$lc_button= zen_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>';
}
}
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?
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.
Re: Help with call for price and add to cart buttons
Quote:
Originally Posted by
jwaynehinkle
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.
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.
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.
Re: Help with call for price and add to cart buttons
Quote:
Originally Posted by
mc12345678
I guess the price could be left blank and that would prevent such price display.
That's the way I did it.
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
Re: Help with call for price and add to cart buttons
Please provide a link to a Call for Price product on your site.
Re: Help with call for price and add to cart buttons