Been searching posts for this answer and would appreciate being pointed to where the answer is. On my Call for Price items I would like to change the Contact Us text or substitute an image. Have not been able to figure where this is done. Any hints?
Been searching posts for this answer and would appreciate being pointed to where the answer is. On my Call for Price items I would like to change the Contact Us text or substitute an image. Have not been able to figure where this is done. Any hints?
Not exactly sure what you're asking, but in english.php:
Line #432 : define('PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT','Call for Price');
Line #433 : define('TEXT_CALL_FOR_PRICE','Call for price');
You're right about that define. I must have changed it from Call for price to Contact Us sometime over the last six years and forgot about it. I found the CSS controlling it in the #cartAdd section of the stylesheet so I will play around with that for the text. I may try adding an image to the link as second, less important step. Thanks for your reply.
I know this is really old thread but my question is directly related to this thread:)
I installed v1.5.5 last week and have hit a snag with Call for price in the new products random center boxes display area.
Call for price is showing up as 'Call for price>'...note the >.
I have checked the language files and any file that contains the phrase 'TEXT_CALL_FOR_PRICE' trying to find this extra closing bracket but I can not find it anywhere.
Any clues? My test web page is xxxx://jestcountrystuff.com/XXXXXXXXXXX/index.php?main_page=index (replace XXXXXXXX with test_shop).
I also have modified my center boxes to display a 'Buy Now' button above the products. The button is not showing up for 'Call For Price' products, but rather, 'Call for price>' is showing up as a link to my contact page. I have triple checked my mod to make sure I didn't put in an extra closing bracket.
I'd appreciate if someone could point me in the right direction.
Above indicate that looked in the language files; however, if the extra > is not there, then it would be in the that uses the constant... That would most likely be a template file or it could be in the base code.
Note: I have not independently verified that this is part of a vanilla install. If you have installed a template, then suggest temporarily switching to one of the default templates...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Appreciate your insight and quick response!
I believe the problem is in my customization...I disabled it and the problem went away. Time to mess with the #@$#$ periods, commas, and quotes...LOL.
Actually, the problem is not in my code, but I was able to compensate by leaving a closing bracket off of my <br / that line spaces below 'Call for price'...still not sure where it is creeping in but all is working now.
FYI to anyone who wants to add a buy now button to your random product center boxes...here's the code.
includes/modules/your template/new_products.php around line 69. This can also be applied to featured and all products.
PHP Code:
/*MIKE COMMENTED OUT
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
*/
/*MIKE ADDED*/
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
//$products_desc = substr(strip_tags(trim(zen_get_products_description($new_products->fields['products_id'], $_SESSION['languages_id']))),0,100).'…';
$buy_now_link = zen_get_buy_now_button($new_products->fields['products_id'],
'<a href="' . zen_href_link($_GET['main_page'],
zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' .
$new_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>');
if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsNew centeredContent back" style="width:' . $col_width .'%;"> <br />' . $buy_now_link . '<br /><br /',
'text'=>(($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']),
'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'],
$new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']),
'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
/*END MIKE*/
Actually, the problem is not in my code, but I was able to compensate by leaving a closing bracket off of my <br / that line spaces below 'Call for price'...still not sure where it is creeping in but all is working now.
FYI to anyone who wants to add a buy now button to your random product center boxes...here's the code.
includes/modules/your template/new_products.php around line 69. This can also be applied to featured and all products.
PHP Code:
/*MIKE COMMENTED OUT
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
*/
/*MIKE ADDED*/
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
//$products_desc = substr(strip_tags(trim(zen_get_products_description($new_products->fields['products_id'], $_SESSION['languages_id']))),0,100).'…';
$buy_now_link = zen_get_buy_now_button($new_products->fields['products_id'],
'<a href="' . zen_href_link($_GET['main_page'],
zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' .
$new_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>');
if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsNew centeredContent back" style="width:' . $col_width .'%;"> <br />' . $buy_now_link . '<br /><br /',
'text'=>(($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']),
'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'],
$new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']),
'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
/*END MIKE*/
Actually, the problem is not in my code, but I was able to compensate by leaving a closing bracket off of my <br / that line spaces below 'Call for price'...still not sure where it is creeping in but all is working now.
FYI to anyone who wants to add a buy now button to your random product center boxes...here's the code.
includes/modules/your template/new_products.php around line 69. This can also be applied to featured and all products.
PHP Code:
/*MIKE COMMENTED OUT
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew
centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
*/
/*MIKE ADDED*/
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
//$products_desc = substr(strip_tags(trim(zen_get_products_description($new_products->fields['products_id'], $_SESSION['languages_id']))),0,100).'…';
$buy_now_link = zen_get_buy_now_button($new_products->fields['products_id'],
'<a href="' . zen_href_link($_GET['main_page'],
zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' .
$new_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>');
if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsNew centeredContent back" style="width:' . $col_width .'%;"> <br />' . $buy_now_link . '<br />
<br /', //CLOSING BRACKET INTENTIONALLY REMOVED TO COMPENSATE FOR A BRACKET CREEPING IN FROM SOMEWHERE ELSE
'text'=>(($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']),
'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'],
$new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']),
'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
/*END MIKE*/
Dang, sorry about the triple post...not sure how that happened.
Bookmarks