Results 1 to 9 of 9

Hybrid View

  1. #1
    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...

  2. #2
    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

  3. #3
    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...

  4. #4
    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