Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2006
    Posts
    67
    Plugin Contributions
    0

    Default Call for Price button

    Hi,

    This is a simple guide that you can use to convert your Call for Price

    "boxed" link into a Call for Price XHTML button:

    1. First define a name for your button. Open the stylesheet_css_buttons.css
    file which you will find in includes/templates/myTemplate/css/
    and add a name for your button:

    For example, let's assume that you want to name your button call_for_price

    so at approx. line 50 add the following statement (I have highlighted it in bold):

    .button_call_for_price, .button_write_review, .button_TellAFriend,

    .button_back, .button_checkout, .button_continue_shopping,

    .button_change_address, .button_logoff { display: block; }

    2. Open english.php which you will find at includes/languages/myTemplate/english.php

    and then go to approx. line 452 and change the code

    define('TEXT_CALL_FOR_PRICE','Call for price');

    to (make sure that the code is placed all on the same line)

    define('TEXT_CALL_FOR_PRICE','<span class="cssButton button_ask_for_quote"

    onmouseover="this.className=\'cssButtonHover button_ask_for_quote

    button_ask_for_quote\'" onmouseout="this.className=\'cssButton

    button_ask_for_quote\'" style="width: 84px;" >&nbsp;Call for

    Price&nbsp;</span>');

    These 2 steps will ensure that the "Call for Price" (if you want to use a different text just change the text "Call for Price" to something you like e.g. "Ask for Quote") button that is created will follow the same style as the other buttons on your web site (assuming that you have enabled stylesheet buttons (instead of using picture buttons).

    I hope that you will find this guideline useful

    Hansi
    Last edited by hansi; 9 Oct 2007 at 12:57 PM.

  2. #2
    Join Date
    Aug 2006
    Posts
    67
    Plugin Contributions
    0

    Default Re: Call for Price button

    Hi Guys,

    There is some typos in step 2:

    Please change

    define('TEXT_CALL_FOR_PRICE','<span class="cssButton button_ask_for_quote"

    onmouseover="this.className=\'cssButtonHover button_ask_for_quote

    button_ask_for_quote\'" onmouseout="this.className=\'cssButton

    button_ask_for_quote\'" style="width: 84px;" >&nbsp;Call for

    Price&nbsp;</span>');

    to

    define('TEXT_CALL_FOR_PRICE','<span class="cssButton button_call_for_price"

    onmouseover="this.className=\'cssButtonHover button_call_for_price\'"
    onmouseout="this.className=\'cssButton
    button_call_for_price\'" style="width: 84px;" >&nbsp;Call for
    Price&nbsp;</span>');

    Regards,

    Hansi

    Quote Originally Posted by hansi View Post
    Hi,

    This is a simple guide that you can use to convert your Call for Price

    "boxed" link into a Call for Price XHTML button:

    1. First define a name for your button. Open the stylesheet_css_buttons.css
    file which you will find in includes/templates/myTemplate/css/
    and add a name for your button:

    For example, let's assume that you want to name your button call_for_price

    so at approx. line 50 add the following statement (I have highlighted it in bold):

    .button_call_for_price, .button_write_review, .button_TellAFriend,

    .button_back, .button_checkout, .button_continue_shopping,

    .button_change_address, .button_logoff { display: block; }

    2. Open english.php which you will find at includes/languages/myTemplate/english.php

    and then go to approx. line 452 and change the code

    define('TEXT_CALL_FOR_PRICE','Call for price');

    to (make sure that the code is placed all on the same line)

    define('TEXT_CALL_FOR_PRICE','<span class="cssButton button_ask_for_quote"

    onmouseover="this.className=\'cssButtonHover button_ask_for_quote

    button_ask_for_quote\'" onmouseout="this.className=\'cssButton

    button_ask_for_quote\'" style="width: 84px;" >&nbsp;Call for

    Price&nbsp;</span>');

    These 2 steps will ensure that the "Call for Price" (if you want to use a different text just change the text "Call for Price" to something you like e.g. "Ask for Quote") button that is created will follow the same style as the other buttons on your web site (assuming that you have enabled stylesheet buttons (instead of using picture buttons).

    I hope that you will find this guideline useful

    Hansi

  3. #3
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Call for Price button

    Here is the link to my Call For Price test product:
    http://www.time-co.com/zencart/index...products_id=25

    I would like the Call for Price image (which is located next to the product picture) to libe clickable and link to my Ask a Product Question mail form
    at
    http://www.time-co.com/zencart/index...products_id=25

    and then either eliminate/stop from displaying the other Call for price plain boxed link (it is located now above Tell a Friend button) OR if the above is not possible to replace it with the same Call for Price image and link (next to the product picture).

    I would appreciate your help

  4. #4
    Join Date
    Aug 2006
    Posts
    67
    Plugin Contributions
    0

    Default Re: Call for Price button

    Hi,

    I am not sure if there is an easy way for the first part but here is a simple solution for the second part of your question:

    1. Ignore step 1 of my guidelines and open english.php (in includes\languages\myTemplate where myTemplate here should be replaced with your template)

    2. In step 2, change the code

    define('TEXT_CALL_FOR_PRICE','<span class="cssButton button_call_for_price"

    onmouseover="this.className=\'cssButtonHover button_call_for_price\'"
    onmouseout="this.className=\'cssButton
    button_call_for_price\'" style="width: 84px;" >&nbsp;Call for
    Price&nbsp;</span>');

    to

    //where myTemplate here should be replaced with your template
    define('TEXT_CALL_FOR_PRICE','<img src="includes/myTemplate/images/my_call_for_price_image.jpg " />');

    I also noticed that you have another image "Ask us about this item". Why do you want to make Call for price image (first part of your question) clickable if you already have a clickable alternative i.e. "Ask us about this item"? I think you perhaps should just use the Call for price image shown next to your product (or change its style) as a label/ tag to indicate to your customer that the product is a call-for-price product.

    By the way, you have a very nice astaethically looking template. Did you download and use any Zencart add-ons for it?

    Regards,

    Hansi

    Quote Originally Posted by all4coffee View Post
    Here is the link to my Call For Price test product:
    http://www.time-co.com/zencart/index...products_id=25

    I would like the Call for Price image (which is located next to the product picture) to libe clickable and link to my Ask a Product Question mail form
    at
    http://www.time-co.com/zencart/index...products_id=25

    and then either eliminate/stop from displaying the other Call for price plain boxed link (it is located now above Tell a Friend button) OR if the above is not possible to replace it with the same Call for Price image and link (next to the product picture).

    I would appreciate your help

  5. #5
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Call for Price button

    Quote Originally Posted by hansi View Post
    Hi,

    I also noticed that you have another image "Ask us about this item". Why do you want to make Call for price image (first part of your question) clickable if you already have a clickable alternative i.e. "Ask us about this item"? I think you perhaps should just use the Call for price image shown next to your product (or change its style) as a label/ tag to indicate to your customer that the product is a call-for-price product.

    By the way, you have a very nice astaethically looking template. Did you download and use any Zencart add-ons for it?

    Regards,

    Hansi
    Thanks for the code to the second part of my question. I will try it later today and let you know if it worked.

    Good point re: first button.

    I based the design on Academe template. The add ons installed are:
    Column Layout Grid v. 1.3.6
    Image Handler 2.0 zc 13
    Report a Cheaper Price 1.1
    SMS for sale 1.1
    FCK Editor (newest)
    HoverBox 2
    Category Select Drop Down Menu v. 1.0
    Ask A Question w/ sidebox V 1.8
    Absolute Links Sidebox v. 1.01
    Printable Price List v. 1.4.1
    Edit Orders_1.1
    Email Archive Manager 1.4
    Add Customers from Admin v.1.0
    Add Phone Number to Contact Us
    Admin Notes v. 1.0

    Thanks again!
    all4coffee

  6. #6
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Call for Price button

    Quote Originally Posted by hansi View Post
    Hi,

    I am not sure if there is an easy way for the first part but here is a simple solution for the second part of your question:

    1. Ignore step 1 of my guidelines and open english.php (in includes\languages\myTemplate where myTemplate here should be replaced with your template)

    2. In step 2, change the code

    define('TEXT_CALL_FOR_PRICE','<span class="cssButton button_call_for_price"

    onmouseover="this.className=\'cssButtonHover button_call_for_price\'"
    onmouseout="this.className=\'cssButton
    button_call_for_price\'" style="width: 84px;" >&nbsp;Call for
    Price&nbsp;</span>');

    to

    //where myTemplate here should be replaced with your template
    define('TEXT_CALL_FOR_PRICE','<img src="includes/myTemplate/images/my_call_for_price_image.jpg " />');

    I also noticed that you have another image "Ask us about this item". Why do you want to make Call for price image (first part of your question) clickable if you already have a clickable alternative i.e. "Ask us about this item"? I think you perhaps should just use the Call for price image shown next to your product (or change its style) as a label/ tag to indicate to your customer that the product is a call-for-price product.

    By the way, you have a very nice astaethically looking template. Did you download and use any Zencart add-ons for it?

    Regards,

    Hansi
    Hansi,

    as you can see at:
    http://www.time-co.com/zencart/index...products_id=31

    your code worked, except I ran into a problem. ..
    I did change the boxed text into the button and I even specified the link to my Request the Best Price form (this link however is static and always points to the same product, regardless of the actual product shown). The Request the Best Price form is based on Ask the Question About the product form and requires specified product id to work. I would like the link to work like the one on the Ask Us About this Item but it might not be possible since it is defined in the english.php file.

    It is like this:
    define('TEXT_CALL_FOR_PRICE','<a href="<A href="http://www.time-co.com/zencart/index.php?main_page=ask_a_question2&products_id=25"><img">http://www.time-co.com/zencart/index.php?main_page=ask_a_question2&products_id=25"><img src="images/button_call_for_price.gif"alt="Request Our Best Price" />');

    and it would not work without the product id specified so I replaced the above link with the following:
    a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id='
    . $_GET['products_id']) . '"

    This works fine from the individual product pages but says the the product cannnot be found if clicked from category listing where two products are call for price like on this page:

    http://www.time-co.com/zencart/index...=index&cPath=2

    Is it possible not to display the individual Call for Price buttons on category pages?

    I would appreciate any suggestions if anything comes to your mind...

  7. #7
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Call for Price button

    Quote Originally Posted by all4coffee View Post
    Hansi,

    This works fine from the individual product pages but says the the product cannnot be found if clicked from category listing where two products are call for price like on this page:

    http://www.time-co.com/zencart/index...=index&cPath=2

    Is it possible not to display the individual Call for Price buttons on category pages?

    I would appreciate any suggestions if anything comes to your mind...
    PS. Few hours later... I think I did it. The code displaying the Call For Price "boxed" link is in /includes/functions/functions_general.php. I just commented out the relative line of the code and the framed link went away on Call for Price item pages. The individual Call 4 Price buttons on category pages (under Call For Price items also went away). The More Info links are still there under each product which is fine.

    Then I just defined a new Call 4 Price button such as Tell a Friend and this button leads to my Call 4 Best Price form (which is an edited copy of Ask About this Item mode)

    Just need to do some cleanup, tags, etc.

    I'm providing the above details in case someone was following this thread and might find it helpful. Please note that I'm by far not a pro with all this stuff and possibly shouldn't have mess with the functions_general.php - so if you do it MAKE A COPY - I did. It does look that I got away with it - everything seems to function as it should.

    Big thanks to Hansi for the initial code

  8. #8
    Join Date
    Aug 2006
    Posts
    67
    Plugin Contributions
    0

    Default Re: Call for Price button

    Hi all4coffee,

    I am glad it worked for you. Just a small not about your amended code:


    define('TEXT_CALL_FOR_PRICE','<a href="<A href="http://www.time-co.com/zencart/index.php?main_page=ask_a_question2&products_id=25 "><img">http://www.time-co.com/zencart/index...products_id=25 "><img src="images/button_call_for_price.gif"alt="Request Our Best Price" />');

    The code in red looks like it has been nested in another a tag which will result in not well-formed XHTML (it looks to me like an unintentional typo). Also, since the nested A tag is typed in caps it violates the rules of 'XHTML-compliance' (all code has to be written in lowercase except for the DOCTYPE tag)

    Regards,

    Hansi

    Quote Originally Posted by all4coffee View Post
    Hansi,

    as you can see at:
    http://www.time-co.com/zencart/index...products_id=31

    your code worked, except I ran into a problem. ..
    I did change the boxed text into the button and I even specified the link to my Request the Best Price form (this link however is static and always points to the same product, regardless of the actual product shown). The Request the Best Price form is based on Ask the Question About the product form and requires specified product id to work. I would like the link to work like the one on the Ask Us About this Item but it might not be possible since it is defined in the english.php file.

    It is like this:
    define('TEXT_CALL_FOR_PRICE','<a href="<A href="http://www.time-co.com/zencart/index.php?main_page=ask_a_question2&products_id=25"><img">http://www.time-co.com/zencart/index.php?main_page=ask_a_question2&products_id=25"><img src="images/button_call_for_price.gif"alt="Request Our Best Price" />');

    and it would not work without the product id specified so I replaced the above link with the following:
    a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id='
    . $_GET['products_id']) . '"

    This works fine from the individual product pages but says the the product cannnot be found if clicked from category listing where two products are call for price like on this page:

    http://www.time-co.com/zencart/index...=index&cPath=2

    Is it possible not to display the individual Call for Price buttons on category pages?

    I would appreciate any suggestions if anything comes to your mind...

  9. #9
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Call for Price button

    Quote Originally Posted by hansi View Post
    Hi all4coffee,

    I am glad it worked for you. Just a small not about your amended code:


    define('TEXT_CALL_FOR_PRICE','<a href="<A href="http://www.time-co.com/zencart/index.php?main_page=ask_a_question2&products_id=25 "><img">http://www.time-co.com/zencart/index...products_id=25 "><img src="images/button_call_for_price.gif"alt="Request Our Best Price" />');

    The code in red looks like it has been nested in another a tag which will result in not well-formed XHTML (it looks to me like an unintentional typo). Also, since the nested A tag is typed in caps it violates the rules of 'XHTML-compliance' (all code has to be written in lowercase except for the DOCTYPE tag)

    Hansi
    Thanks, Hansi.
    To clarify - the above code is now removed and replaced with the original code. To get rid of the "boxed" Call For Price link I commented it out in the functions_general.php

    all4coffee
    Regards,

 

 

Similar Threads

  1. Replies: 13
    Last Post: 21 Feb 2013, 03:52 PM
  2. Disable Call for price url below Call for price image?
    By IllusionGuy in forum General Questions
    Replies: 0
    Last Post: 6 Jan 2009, 10:36 PM
  3. Call for Price button
    By crabdance in forum General Questions
    Replies: 0
    Last Post: 27 Nov 2007, 12:35 AM
  4. Call for price button
    By mcpisik in forum General Questions
    Replies: 1
    Last Post: 24 Sep 2007, 05:39 PM
  5. 'Call for price' button doesn't link!
    By meowynic in forum Managing Customers and Orders
    Replies: 0
    Last Post: 11 Nov 2006, 06:12 AM

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