Announcement

Collapse
No announcement yet.

How to Stay on the Category Page After an Item Has Been Added to the Cart.

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

    How to Stay on the Category Page After an Item Has Been Added to the Cart.

    How to stay on the category page after an item has been added to the basket instead of ending up on the basket page?

    I have this set up on the old store, but can not remember how to do it or find it on line.

    #2
    Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

    In the Category Product List Template, look for the form that surrounds the 'Add to Basket' button. You should see an entry <input type="hidden" name="screen" value="BASK"> change BASK to CTGY.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

      Here is what I changed:

      <form method="post" action="&mvte:global:sessionurl;Screen=CTGY">

      And it works.

      Thank you very much.

      Paul

      Comment


        #4
        Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

        I have this and I cannot get it to work by changing anything:

        <form method="post" action="&mvte:urls:BASK:rr;">
        <input type="hidden" name="Old_Screen" value="&mvte:global:Screen;" />
        <input type="hidden" name="Old_Search" value="&mvte:global:Search;" />
        <input type="hidden" name="Action" value="ADPR" />
        <input type="hidden" name="Quantity" value="1" />
        <input type="hidden" name="Attributes" value="Yes" />
        <input type="hidden" name="Product_Code" value="&mvte:product:code;" />
        <input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;" />
        <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
        <input type="hidden" name="Offset" value="&mvte:global:CatListingOffset;" />
        <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
        <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
        <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
        <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
        <mvt:item name="buttons" param="AddToBasketE" />

        Comment


          #5
          Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

          Right after:

          <form method="post" action="&mvte:urls:BASK:rr;">

          add

          <input type="hidden" name="screen" value="CTGY" />
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #6
            Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

            Thank you for the reply but that does not work. I get this message:

            The item you requested is not available at this time.

            Here is the url:

            http://www.pit-bull.com/category/christmas.html

            Comment


              #7
              Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

              Try this:

              <form method="post" action="&mvte:global:sessionurl;Screen=CTGY">
              <input type="hidden" name="Old_Screen" value="&mvte:global:Screen;" />
              <input type="hidden" name="Old_Search" value="&mvte:global:Search;" />
              <input type="hidden" name="Action" value="ADPR" />
              <input type="hidden" name="Quantity" value="1" />
              <input type="hidden" name="Attributes" value="Yes" />
              <input type="hidden" name="Store_Code" value="&mvte:store:code;" />
              <input type="hidden" name="Product_Code" value="&mvte:product:code;" />
              <input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;" />
              <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
              <input type="hidden" name="Offset" value="&mvte:global:CatListingOffset;" />
              <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
              <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
              <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
              <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
              <mvt:item name="buttons" param="AddToBasketE" />
              </form>

              Comment


                #8
                Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                Nope, that doesn't work either. I had already tried that. The original post that I posted is the only one that will actually add to basket but it lands on the basket. The reason for a line item view in a category is to be able to add one and then add another or two. I have this working on many earlier versions of miva but this most recent upgrade with uri management has changed a lot. Maybe someone from miva can add their input at this stage!
                Last edited by fastees; 10-23-15, 11:23 AM.

                Comment


                  #9
                  Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                  What happens if you change

                  Code:
                  <form method="post" action="&mvte:urls:BASK:rr;">
                  to

                  Code:
                  <form method="post" action="&mvte:urls:CTGY:rr;">

                  Comment


                    #10
                    Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                    Same deal. And it resolves to this url http://www.pit-bull.com/CTGY.html.

                    I get this:

                    The item you requested is not available at this time.

                    Comment


                      #11
                      Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                      The reason this URI won't work is because this just takes you to the root relative (//domain.com) version of the CTGY page:

                      <form method="post" action="&mvte:urls:CTGY:rr;">

                      It does not include the current category code you are on. Instead you need the category URI for the category you are viewing:

                      <form method="post" action="&mvte:category:link;">

                      This should output the search friendly version the the current category you are on.
                      Brennan Heyde
                      VP Product
                      Miva, Inc.
                      [email protected]
                      https://www.miva.com

                      Comment


                        #12
                        Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                        Sorry but that nets the same result. It does resolve to the category url it still says not found. and does not add to cart.

                        Comment


                          #13
                          Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                          It may be a conflict because you are also passing all the form hidden inputs. Miva may be seeing the Screen twice and Category Code twice.

                          Try using a simple add to cart form:


                          Code:
                          <form method="post" action="&mvte:category:link;">
                          	<input type="hidden" name="Action" value="ADPR" />
                          	<input type="hidden" name="Quantity" value="1" />
                          	<input type="hidden" name="Attributes" value="Yes" />
                          	<input type="hidden" name="Product_Code" value="&mvte:product:code;" />
                          	<mvt:item name="buttons" param="AddToBasketE" />
                          </form>
                          Brennan Heyde
                          VP Product
                          Miva, Inc.
                          [email protected]
                          https://www.miva.com

                          Comment


                            #14
                            Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                            Brennan, are the new link structures documented anywhere?

                            Comment


                              #15
                              Re: How to Stay on the Category Page After an Item Has Been Added to the Cart.

                              Success! That works if you don't have attributes this works with attributes:

                              <form method="post" action="&mvte:category:link;">
                              <input type="hidden" name="Action" value="ADPR" />
                              <input type="hidden" name="Quantity" value="1" />
                              <input type="hidden" name="Product_Code" value="&mvte:product:code;" />
                              <mvt:item name="buttons" param="AddToBasketE" />
                              </form>


                              Thank you!

                              Comment

                              Working...
                              X