How to add items to cart in search result page

WPPizza – A Restaurant Plugin for WordPress Support General Support How to add items to cart in search result page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33002
    Nurullah
    Participant

      Hi,
      When we search something, we can not add items to cart, is there any option to do that?

      #33028
      Olly
      Admin & Mod

        you need to create a single.php page as described here
        http://docs.wp-pizza.com/developers/?section=wppizza-markup-single-single-php

        (although this is mentioned in the widget, the link i put there – which is meant to point to the page above – is actually wrong, i need to fix that )

        #33029
        Olly
        Admin & Mod

          actually , i just tried this and although you probably want to create a single.php as outlined above (as your result would link to a single item )
          my guess is you also want the item to be displayed as “normal” so to speak (i.e with clickable prices etc in the searchresults)

          i assume this is indeed doable and i *believe* i wrote the documentation for this somewhere, but need to find it (and if it does not exist yet , i’ll write it if this sort of thing is possible )

          but you’ll have to bear with me for a bit on that one

          #33041
          Olly
          Admin & Mod

            update to the above:
            it transpires there is no documentation I wrote on that subject , simply because there are no provisions for this (yet)

            i spent most of the day today trying to find a way to do this automatically in some way shape or form to integrate this without having to edit/mess around with theme templates.
            Alas, there does not appear to be a way to do this without editing theme files (similar to the single page templates in the link i posted above) or, to be more accurate, I could not find any universally usable way to do this without the need to edit theme (search) templates.
            Note: this kind of makes sense up to a point , as themes should have control over layout and plugins should add the functionality. Problem being here that wppizza is a bit of a hybrid on that front.

            Offshot being, I have to write and add a function or two to the plugin and add some documentation to the docs regarding how to edit/amend the search template

            I am fully committed to do this, but it will take a day or 2 to do to add to the plugin and writing the docs

            please bear with me

            #33073
            Olly
            Admin & Mod

              quick update: now enabled/doable with wppizza v3.1.6
              but theme template edit/copies will be required – please see docs
              https://docs.wp-pizza.com/developers/?section=wppizza-markup-search
              https://docs.wp-pizza.com/developers/?section=wppizza-markup-search-search-php

              #33082
              Nurullah
              Participant

                Great work. Thanks!

              Viewing 6 posts - 1 through 6 (of 6 total)
              • The topic ‘How to add items to cart in search result page’ is closed to new replies.