WPPizza – A Restaurant Plugin for WordPress › Support › General Support › How to add items to cart in search result page
- AuthorPosts
- 19 November, 2017 at 8:23 am #33002
Hi,
When we search something, we can not add items to cart, is there any option to do that?20 November, 2017 at 1:07 am #33028you 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 )
20 November, 2017 at 1:25 am #33029actually , 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
21 November, 2017 at 12:06 am #33041update 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
21 November, 2017 at 5:44 pm #33073quick 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-php22 November, 2017 at 5:38 am #33082Great work. Thanks!
- AuthorPosts
- The topic ‘How to add items to cart in search result page’ is closed to new replies.