Suggest a Product

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #18239
    nikolaoskaikisis
    Participant

      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.

      #18242
      Olly
      Admin & Mod

        there 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

        #18243
        nikolaoskaikisis
        Participant

          I 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’]’);
          }

          #18244
          Olly
          Admin & Mod

            example updated

            #18245
            nikolaoskaikisis
            Participant

              Sorry but still syntax error but only on this line now my_function(){

              #18246
              Olly
              Admin & Mod

                PS: 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)

                #18247
                Olly
                Admin & Mod

                  updated again – these are just quick codesnippets.

                  #18248
                  Olly
                  Admin & Mod
                    This reply has been marked as private.
                    #18249
                    nikolaoskaikisis
                    Participant
                      This reply has been marked as private.
                      #18250
                      Olly
                      Admin & Mod
                        This reply has been marked as private.
                        #18251
                        nikolaoskaikisis
                        Participant
                          This reply has been marked as private.
                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • The topic ‘Suggest a Product’ is closed to new replies.