Announcement

Collapse
No announcement yet.

Return to Screen after adding all to basket

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

    Return to Screen after adding all to basket

    This code uses the toolkit counter function to create an add-all-to-basket category page. It's a simple list-layout with no sorting, pagination or filtering. A single button adds the selected quantity of each product to basket.

    After the "Add All to Basket" button is clicked the user is directed to the home page. How can I get it to stay on the category page? I tried changing the action and old_screen values but if it returned to the category page it displayed the extended-layout and not the list-layout I'm using?


    Code:
    <div class="line-item">
      <table>
        <tr class="header-row">
          <td class="item-code"> Code </td>
          <td class="item-name"> Name </td>
          <td class="item-image"> Image </td>
          <td class="item-price"> Price </td>
          <td class="item-buttons">&nbsp;</td>
        </tr>
        <form method="post" action="&mvt:global:sessionurl;">
          <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="NEW" />
          <input type="hidden" name="SubScreen" value="TKADPR" />
          <input type="hidden" name="Store_Code" value="&mvte:global:Store_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:foreach iterator="product" array="category_listing:products">
            <mvt:item name="toolkit" param="counter|current_nbr" />
            <tr>
              <td class="item-code"><a href="&mvte:product:link;">&mvt:product:code;</a></td>
              <td class="item-name">&mvt:product:name; </td>
              <td class="item-image"><img src="&mvte:product:thumbnail;" alt="&mvte:product:name;" /></td>
              <td class="item-price">&mvt:product:formatted_price; </td>
              <td class="item-buttons" />
              <input type="text" name="Quantity[&mvte:global:current_nbr;]" id="&mvt:product:id;" value="0" class="product-quantity-input textfield" />
              <input type="hidden" name="Product_Code[&mvte:global:current_nbr;]" value="&mvt:product:code;" />
                </td>
            </tr>
          </mvt:foreach>
          <tr>
            <td colspan="5" align="right"><input type="hidden" name="current_nbr" value="&mvt:global:current_nbr;" />
              <input type="submit" value="Add All To Basket" class="button" /></td>
          </tr>
        </form>
      </table>
    </div>
    Gary

    [email protected]
    www.icCommerce.com

    #2
    Re: Return to Screen after adding all to basket

    What CGI variables (i.e., what's in the URL) that causes the initial display to appear in the browser? You need some way of passing that through so the its can return.
    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: Return to Screen after adding all to basket

      http://dev.paddletramps.biz/mm5/merc...egory_Code=100
      Gary

      [email protected]
      www.icCommerce.com

      Comment


        #4
        Re: Return to Screen after adding all to basket

        http://dev.paddletramps.biz/mm5/merchant.mvc?
        Screen=CTGY
        &Store_Code=ws
        &Category_Code=100
        Gary

        [email protected]
        www.icCommerce.com

        Comment


          #5
          Re: Return to Screen after adding all to basket

          Hello!

          I've been trying to figure out how to do an "Add All to Basket" on my CTGY page.
          Right now, I have an Update button for each item on the page.
          My customers usually add 15 to 20 items to a single order from that CTGY page which could be a real pain!

          http://www.source1binders.com/mm5/me...gory_Code=TABS

          Could you share with me how you did it?

          Thank you!!!!

          Comment

          Working...
          X