• I have been trying to find out how to make the continue shopping link go to all products page on my site with no success 🙁 can anyone help me please!

Viewing 15 replies - 1 through 15 (of 46 total)
  • You have provided no real valuable information to help us help you. What plugin are you using? What is your site address? What have you tried?

    Thread Starter cruzk1

    (@cruzk1)

    using the plugging WP eCommerce. When a customer makes a purchase he has the option to checkout or to continue shopping. when i click continue shopping it stays on the same page. I want to make go to another page (all products page).

    you don’t see the page on the site unless you are customer who logs in. http://www.amerimacs.com

    Thread Starter cruzk1

    (@cruzk1)

    Thanks Evan for helping out.

    Unfortunately I’ve never used the plugin, but from a quick Google search I was able to come up with a somewhat reasonable resolution.

    You can use jQuery to target the element and alter the href attribute on it, on page load.

    For example, you would include this into your functions.php file:

    function change_continue_shopping_link() {
      ?>
      <script>
       jQuery(function() {
         jQuery('.continue_shopping').attr( 'href' , 'http://www.google.com' );
       });
      </script>
      <?php
    }
    add_action( 'wp_head' , 'change_continue_shopping_link' );

    Essentially, what it’s doing is printing out that javascript into the head of your site on each page, and looking for the continue shopping link. If found it will alter the href attribute to specify whatever it is you’d like.

    That should change the continue shopping link to link to google.com, but you can alter it to direct the user to the ‘All Products’ page (whatever that link may be )

    Let us know if that works for you,

    Evan

    Thread Starter cruzk1

    (@cruzk1)

    do i put this at the bottom?

    Thread Starter cruzk1

    (@cruzk1)

    nothing change. still the same.

    You put it towards the bottom of functions.php

    Can you right click on the continue shopping button , select inspect element and let me know the class name and the href on it?

    Thread Starter cruzk1

    (@cruzk1)

    Thread Starter cruzk1

    (@cruzk1)

    continue_shopping

    Continue Shopping

    Thread Starter cruzk1

    (@cruzk1)

    onclick=”jQuery("#fancy_notification")

    Thread Starter cruzk1

    (@cruzk1)

    i am not sure if i gave you what you needed?

    hmm, yea that seems to be it. The class is correct on the javascript.

    Can you add in a line to that function to test if it is actually running on the page?

    Try this:

    function change_continue_shopping_link() {
      ?>
      <script>
       jQuery(function() {
         jQuery('.continue_shopping').attr( 'href' , 'http://www.google.com' );
         alert('Javascript running...');
       });
      </script>
      <?php
    }
    add_action( 'wp_head' , 'change_continue_shopping_link' );

    That should print out an alert that says ‘Javascript running…’ on each page load. Check to see if it alerts you on the page with the continue shopping button.

    Also, what happens when you click on the continue shopping button? That onclick event leads me to believe something should be happening.

    Thread Starter cruzk1

    (@cruzk1)

    it gave me a parse error

    Thread Starter cruzk1

    (@cruzk1)

    i deleted the first code you gave me then i place the new one. it still does not change it stays the same.

Viewing 15 replies - 1 through 15 (of 46 total)

The topic ‘wp ecommerce’ is closed to new replies.