WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Suggest a Product
- AuthorPosts
- 20 May, 2016 at 6:53 pm #18239
Hello, how can i suggest a Product to a customer before placing an order, maybe with some popup who have 4 different links to the menu like Salad, Drinks, Pasta or similar.
20 May, 2016 at 8:20 pm #18242there are many action hooks in the order page you could use to add things (using shortcodes i would have thought).
as an example you could do – in your functions.php :add_action('wppizza_gateway_choice_before', 'my_function'); function my_function(){ echo do_shortcode('[wppizza single="11"]'); }
or any other shortcodes you want to use
search templates/wppizza-orders.php for anything that says “do_action” for a variety of places where you could hook into
20 May, 2016 at 8:27 pm #18243I have add this shortcode to function.php but it has some syntax error on this 2 lines
my_function(){
echo do_shortcode(‘[wppizza single=’11’]’);
}20 May, 2016 at 8:30 pm #18244example updated
20 May, 2016 at 8:32 pm #18245Sorry but still syntax error but only on this line now my_function(){
20 May, 2016 at 8:33 pm #18246PS: this does not do any popup (if you want that sort of thing , you have to develop it yourself)
it just adds some items to the checkout page to choose from(not tested by the way, what you do from here is up to you)
20 May, 2016 at 8:38 pm #18247updated again – these are just quick codesnippets.
20 May, 2016 at 8:39 pm #18248This reply has been marked as private.20 May, 2016 at 8:39 pm #18249This reply has been marked as private.20 May, 2016 at 8:44 pm #18250This reply has been marked as private.20 May, 2016 at 9:06 pm #18251This reply has been marked as private. - AuthorPosts
- The topic ‘Suggest a Product’ is closed to new replies.