• I would like to add my Telegram Order notification the Tag of each Product.
    Right now it displays the following:

    New order 936 on Wisdom Shop??
    ??  , [email protected]
    ?? 269.99 BGN
    Order NOT Paid (Плащане после) 
    Order Status: pending
    Order Date: 19 March 2022, 10:02 pm
    
    ------> ITEMS <------
    1 x Grey Goose + 4 Коли - 1L - 269.99 BGN
    -------------------

    But I want to have the product tag displayed next to the product price
    Example:
    ——> ITEMS <——
    1 x Grey Goose + 4 Коли – 1L – 269.99 BGN – product_tag

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author rainafarai

    (@rainafarai)

    hi … what is product tag?

    Thread Starter menux

    (@menux)

    Hello,
    Product tags are another way to relate products to each other, next to product categories. Contrary to categories, there is no hierarchy in tags; so there are no “subtags.”
    When you download Woocommerce you get an option Products in your wordpress dashboard.
    Products can have Categories, Attributes and Tags. For example: If I am selling a Dress that is called “Star One” – $349,99 I want the telegram notification to display the the tag of the dress. In this case Calvin Klein is the Tag of the product.
    This is what I see right now:
    ——> ITEMS <——
    1 x Product 1 – Attribute – price
    ——————-
    But I want:
    ——> ITEMS <——
    1 x Product 1 – Attribute – price – Tag
    ——————-

    The taxonomy is product_tag.

    • This reply was modified 2 years, 8 months ago by menux.
    Plugin Author rainafarai

    (@rainafarai)

    maybe the product has more than one tag? do you need all ?

    Thread Starter menux

    (@menux)

    In my case I have only 1 Tag per product.
    And I want to display it in the message next to each product.
    One dress can’t be Calvin Klein and Karl Lagerfeld at the same time. Each product has one Tag in my case which makes it perfect. Yes I need all. Thanks a lot!

    Thread Starter menux

    (@menux)

    Do I have to send you something or you will edit the plugin itself?

    Plugin Author rainafarai

    (@rainafarai)

    Hooks :
    <?php function nftb_order_product_line($product_id){
    $product = wc_get_product( $product_id );
    return ” | “.$product->get_slug().” “;
    } ?php>

    You can use the hooks i created that adds something at the end of every product line.. in this case the product slug …. you have the product id so you can get everything from the product object.

    Add the hook modified code to you functions.php in the acive theme.

    You can do yourself.. if you can’t and you need a custom modification send me you contact i will write you back with an offer.

    have nice day

    • This reply was modified 2 years, 8 months ago by rainafarai.
    • This reply was modified 2 years, 8 months ago by rainafarai.
    • This reply was modified 2 years, 8 months ago by rainafarai.
    Thread Starter menux

    (@menux)

    Hello,
    I tried to do it but this is the result

    ?? New order 994 on MenuX??
    ??  , 
    ?? 399.99 BGN
    Order NOT Paid (Плащане после) 
    Order Status: pending
    Order Date: 21 March 2022, 2:39 pm
    
    ------> ITEMS <------
    1 x Gold Label + 4 Коли - 399.99 BGN”gold-label-4-%d0%ba%d0%be%d0%bb%d0%b8”product_tag“
    -------------------

    Please contact me on my email: [email protected]
    and let me know how we can proceed. Thank you

    that is a problem with the encoding of string to URL, see over there how “decode” it https://www.php.net/manual/ru/function.urldecode.php

    Thread Starter menux

    (@menux)

    Hello, I tried so many times and still it doesn’t work. Can you do it for me? I can pay for that.

    Plugin Author rainafarai

    (@rainafarai)

    I can help you contact me on telegram on monday … @rainavilla

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to add Product Tag to Telegram Order Message’ is closed to new replies.