Home Forums WoodMart support forum I want to add url and title on whatsapp link

I want to add url and title on whatsapp link

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #379445

    Chantage
    Participant

    Hello,

    I want to add product title and url and product price to link in to whatsapp link but this area did not support php codes.

    May you help me please.

    • This topic was modified 2 years, 6 months ago by Chantage.
    Attachments:
    You must be logged in to view attached files.
    #379481

    Hello,

    Thank you very much for choosing our theme and for contacting us.

    This is not the best way to implement this. You can configure the social networks to share and show them on the product page, as the result, you would be able to share the product with other social networks as well.

    Please find the option to configure the social networks in the Theme Settings > Social profiles > Share. Then enable showing the social networks in the Theme Settings > Single product > Show and hide elements.

    After Add to cart area supports text and special HTML blocks. Please find more information here: https://xtemos.com/docs-topic/html-blocks-usage/ Actually, you can add any element to that by means of an HTML block.

    If you have any questions please feel free to contact us.

    Best Regards

    #379483

    Chantage
    Participant

    Sorry this is not helps me.
    1. I don’t want to share product.
    I want customers click whatsapp link and get support. And i want to send Product name, Product price and Product URL with this Whatsapp click link.

    HTML blocks ok, i did it.
    I write ahref like this “https://api.whatsapp.com/send?phone=+90hiddenphonenumber&text= <?php the_title(); ?>”
    And result is https://api.whatsapp.com/send?phone=+90hiddenphonenumber&text=%3C?php%20the_title();%20?%3E

    I show <?php the_title(); ?> as it is. I want this code replice with product page title name dynamic

    #379495

    Chantage
    Participant

    Hi again,

    when i write this code in files it works. (But placement is not correct for me because of this i don’t want to use it there)
    Woodmart: title.php (woocommerce/single-product/title.php)

    <a href="https://api.whatsapp.com/send?phone=+90xxxxxx&text=Merhaba! <?php the_title(); ?>
    "><img class="alignnone wp-image-7122" src="https://www.sexshopbutik.com/wp-content/uploads/2022/05/whattsapp-butonu75867-400x160.jpeg" alt="" width="130" height="52" /></a>

    But when i use this code HTML blocks <?php the_title(); ?> code did not get the title, it prints <?php the_title(); ?> as it is.

    • This reply was modified 2 years, 5 months ago by Chantage.
    #379502

    Chantage
    Participant

    Let me ask my question another way.

    I want to print product title, product url, product price in After “Add to cart button” area

    #379582

    Hello,

    I want to print the product title, product url, product price in After “Add to cart button” area

    HTML structure does not allow solving it by custom CSS. Such modification requires complicated Woocommerce code customization which is not covered by our support.

    Adding code to the after Add to cart area would not work, this area is not destined for any type of code.

    Best Regards

    #379610

    Chantage
    Participant

    Ok.
    What is the file name which is control this area ?
    I try to find but i can’t
    So i can edit it

    #379983

    Hello,

    You need to find the file: woodmart/inc/integrations/woocommerce/template-tags.php
    and this function: woodmart_after_add_to_cart_area()

    If you have any questions please feel free to contact us.

    Best Regards

Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)