Announcement

Collapse
No announcement yet.

Add to Cart from Power Search page issue

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

    Add to Cart from Power Search page issue

    This issue is very similar to my previous post for the CTGY page except it involves the Power Search Product Layout. I thought it was going to be an easy to tweak item after figuring out the CTGY page add to cart

    From what I figured out on the CTGY template, I know it has something to do with the hidden fields


    Code:
     <input type="hidden" name="Action" value="ADPR">
    <input type="hidden" name="Screen" value="&mvte:global:Screen;">
    <input type="hidden" name="Attributes" value="">
    <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
    <input type="hidden" name="Offset" value="&mvte:global:Offset;">
    <input type="hidden" name="Product_Code" value="&mvt:product:code;">
    <input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;">
    <input type="hidden" name="Search" value="&mvte:global:Search;">
    <input type="hidden" name="searchoffset" value="&mvt:pages:offset;" />
    <!-- begin additional inputs //-->
    <input type="hidden" name="attropts1" value="design2">
    <input type="hidden" name="filter_ao1" value="&mvte:global:filter_ao1;">
    <input type="hidden" name="filter_cat" value="&mvte:global:filter_cat;">
    <input type="hidden" name="sort" value="&mvte:global:sort;">
    <input type="hidden" name="customfield1" value="&mvte:global:customfield1;">
    <input type="hidden" name="filter_cf1" value="&mvte:global:filter_cf1;">
    <input type="hidden" name="customfield2" value="&mvte:global:customfield2;">
    <input type="hidden" name="filter_cf2" value="&mvte:global:filter_cf2;">
    <input type="hidden" name="customfield3" value="&mvte:global:customfield3;">
    <input type="hidden" name="filter_cf3" value="&mvte:global:filter_cf3;">
    <input type="hidden" name="openTab" value="&mvt:global:openTab;" />
    
    <input type="hidden" name="ProductsPerPage" value="&mvte:global:ProductsPerPage;">

    The pagination link uses the &searchoffset=&mvt:pages:offset; token to include the number of products on the page and it produces the correct number. But when I try to use it as a hidden item it generates a max number. For example - if there are 60 products per page and there are 6 pages, it inserts an offset of 300 and lands back on the 6th page (instead of whichever page you were on). I did notice that the hidden "Offset" is empty.

    Bill never made it easy, did he?
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Hi Leslie,

    Sadly, you are correct about Bill. You might need to look into what other details are output from the "pages" value other than "offset".
    Matt Zimmermann
    Front-End Development Director / Miva, Inc.

    Comment


      #3
      I know nothing about power search, but why is "pages:offset" referencing a local variable inside a form post for pagination (seems odd).
      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


        #4
        Originally posted by Bruce - PhosphorMedia View Post
        I know nothing about power search, but why is "pages:offset" referencing a local variable inside a form post for pagination (seems odd).
        I put it there to see what it might do. I'm trying to figure out what the equivalent of the CTGY page's is
        Code:
        <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
        This issue is similar to what I dealt with for the CTGY pages https://www.miva.com/forums/forum/de...tgy-page-issue

        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment

        Working...
        X