Announcement

Collapse
No announcement yet.

Call to order button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Call to order button

    how would i a chieve replacing standard button for a product with a call to orde button (that does not add to cart) i have some items that are prohibited by paypal and can only put them on my site if they cannot be added to cart so i want to do phone orders for them.

    Any help is appreciated.

  • #2
    I would suggest using one of the extra fields 6-10 and put a 1 in one of them. Then do a Javascript " if - else " statement in the category and search page where the button is. So you look in extra field 6 for example and if true, show your call to order button, if not, then show the existing code for the buy button.
    I know nothing about Java script, but I did something similar by doing google searches about Javascript if-else statements and experimenting.

    Backup first for easy recovery when the page gets all messed up!

    Comment


    • #3
      Thanks enlightment but thats a bit over my head unless i have detailed instructions. :)

      I have found something that seems to work for me

      I put qty 0 for a product and use the custom out of stock message as seen here.

      Gil Hibben Belt Buckle Survival Knife

      its not an actual button but i think it will work for what i need it to do.
      the message is displayed next to Availability:

      Comment


      • #4
        That works great. Very clear to me.

        Comment


        • #5
          if-else logic

          Hi All, Im trying to implement some sort of an if-else logic on my product page to display a text, "For member pricing, please log on". Once logged on, the text would disappear. Anyone has thoughts how I can do this?

          Much appreciated.
          Jason
          -----------
          http://www.estorecoaching.com

          Comment


          • #6
            Originally posted by estuffs View Post
            Hi All, Im trying to implement some sort of an if-else logic on my product page to display a text, "For member pricing, please log on". Once logged on, the text would disappear. Anyone has thoughts how I can do this?

            Much appreciated.
            Is this simply a message you want to show up if the user is browsing while not logged in, or do you want the logic to affect other things on the page like the displayed price?

            Comment


            • #7
              Sorry, I think I posted my thread on "hanzoswords" by accident.
              cbsteven, yes, a message when the user is not logged in would work as well.
              Jason
              -----------
              http://www.estorecoaching.com

              Comment


              • #8
                This is easy enough to do with javascript. I do something similar on my site.

                First I set a variable isLoggedIn, in the Login section of the frame.html

                Code:
                <!--START: login-->
                <li><a href="myaccount.asp">Login</a></li>
                <li><a href="register.asp">Register</a></li>
                <script type="text/javascript">
                	var isLoggedIn = 0;
                </script>
                <!--END: login-->
                The code in the 'login' section of the page is only executed if the user is not currently logged in, so I set my variable to 0.


                Then in the page where I want to do something with it I just check the value of that variable.

                Code:
                if (isLoggedIn == "0")
                {
                	document.write("You must log in!");
                }
                Note that this is only a partial example, so you can't just copy and paste it and hope it'll work. You need to have a beginner's knowledge of javascript.

                Comment


                • #9
                  Cbsteven, Thank you for this workaround for the logged-in variable. I have been thinking of how to accomplish this, and here it is. Thanks for sharing.

                  Comment


                  • #10
                    Same here, I'll try it out. I love the forum, our community provides so much insight (more than support).
                    Jason
                    -----------
                    http://www.estorecoaching.com

                    Comment


                    • #11
                      My best guess

                      so, I'm wanting to try this because setting stock to zero triggers an "out of stock" script on my category page but would appreciate if someone with knowledge could look this over.

                      Here's my existing code:
                      Code:
                       <!--START: addtocart-->
                                <tr>
                                  <td colspan="2"><table>
                                      <tr>
                                        <td align="right" class="item"><strong>[product_quantity]</strong></td>
                                        <td align="center" width="70" class="price-info"><!--START: qtybox-->
                                          <input type="text" size="3" name="qty-0" value="1" onChange="validateValues(document.add,1);" class="txtBoxStyle">
                                          <!--END: qtybox--></td>
                                        <!--START: reminders_block-->
                                        <td align="center" width="70" class="price-info"><strong>[product_reminder]</strong><br />
                                          <select name="reminder" class="txtBoxStyle" ID="Select1">
                                            <!--START: reminders_frequency_option-->
                                            <option value="[optionvalue]" [selected]>[optiontext]</option>
                                            <!--END: reminders_frequency_option-->
                                          </select></td>
                                        <!--END: reminders_block-->
                                        <td width="50" align="left" class="price-info"><a href="javascript:check_and_add(document.add)"><img src="assets/templates/default/images/buy_btn.gif" border="0"></a></td>
                                      </tr>
                                    </table></td>
                                </tr>
                                <!--END: addtocart-->

                      And, here's what I'm thinking might work

                      <!--START: addtocart-->
                      <tr>
                      <td colspan="2"><table>
                      <tr>
                      <td align="right" class="item"><strong>[product_quantity]</strong></td>
                      <td align="center" width="70" class="price-info"><!--START: qtybox-->
                      <input type="text" size="3" name="qty-0" value="1" onChange="validateValues(document.add,1);" class="txtBoxStyle">
                      <!--END: qtybox--></td>
                      <!--START: reminders_block-->
                      <td align="center" width="70" class="price-info"><strong>[product_reminder]</strong><br />
                      <select name="reminder" class="txtBoxStyle" ID="Select1">
                      <!--START: reminders_frequency_option-->
                      <option value="[optionvalue]" [selected]>[optiontext]</option>
                      <!--END: reminders_frequency_option-->
                      </select></td>
                      <!--END: reminders_block-->
                      <td width="50" align="left" class="price-info">
                      <script type="text/javascript">
                      if ([extrafield4]=1)
                      {
                      document.write('<img src="assets/images/call-to-order.gif" alt="Call to Order" />');
                      }
                      else
                      document.write('<a href="javascript:check_and_add(document.add)"><img src="assets/templates/default/images/buy_btn.gif" border="0"> </a>')
                      </script>
                      </td>
                      </tr>
                      </table></td>
                      </tr>
                      <!--END: addtocart-->

                      Any thoughts?

                      Comment


                      • #12
                        Update: it definitely didn't work :(

                        Comment

                        Working...
                        X