Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #15453

    Hi everybody,

    first of all thanks to the great support.

    I bought the flashlight theme but did not expected that the product price is not shown on the product detail page (see the demo). Not Price shown on the page with all informations to a single product. I just realised the “Add to cart” button and the posibility to solve quantity. How did you fixed to show the product price, because it is important in germany and also more simle for customers not to forget how much to pay for the product. Maybe a line of code is missing in a file (or is it a bug?). WordPress, woocommerce and flashlite are installed in the current stable versions.

    See You

    Jan

    #87566

    Hi!

    Open up flashlight/woocommerce-config/config.php und remove following line:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10, 2);

    Best regards,

    Peter

    #87567

    Hi Peter,

    first of all thanks for your reply. I saw the post but that didn’t realy solve the problem.

    Please take a look on the website (click on shop)

    http://vandog.cc/?post_type=product

    to follow the Products in detail. On the shop page you will see two sample products, VANDOG Coat Prestige and VANDOG Pretty Coat.

    Before i used your postet solution, the product prize was shown on the VANDOG Pretty Coat-Detail Page and only when i wrote an aktionspreis in one variant i was able to see the prize straigt over the quantity. Without specifying a “Aktionspreis” the prize will not be shown on the product detail page anywhere. VANDOG Coat Prestige is a product without variants and the was also not price shown (only at the Shop-Startpage).

    Now i did it in your posted way of solution and the prices are shown directly unter the product title and, at the variant product also over the Quantity. But at VANDOG Coat Prestige the price is not shown in the normal way direct unter the quantitiy (and over the Stock message) like it should be also at VANDOG Coat Prestige.

    At all products the price should not be shown under the product title like the behavior is now with your solution.

    If you take a comparing look at both product pages (also quellcode) i am shure you will see what i mean. How could this be fixed?

    Sorry for my complicate way of demonstrating the failure.

    See You

    Jan

    PS. If it is easier to understand what i mean, i will write in german language.

    #87568

    Hey!

    Basically you don’t want to show the price underneath the main/product title but underneath (or above?) the “Jetzt kaufen” Button?

    Best regards,

    Peter

    #87569

    Hi Peter,

    thanks for your reply.

    Pls only above the “Jetzt kaufen” Button but not under the Page Produkt Titel. Like the layout is basicly set in the Varianten-Produkt VANDOG Pretty Coat. Also to show the (german requirements) information abaout “inklusive gesetzliche MwSt, zzgl. Versand”.

    Best regards,

    Jan

    #87570

    Hi Peter,

    or another clear way of layouting could be to set all other product informations (like name, price, qty, info tabs, Jetzt kaufen-Button a.s.o.) left beside the product picture(s). So it is possible more to see for a customer without scolling so much (monitor is more width than high)

    Best regards,

    Jan

    #87571

    Revert the change I suggested before and add following code to the bottom of config.php:

    add_action( 'woocommerce_after_add_to_cart_button', 'inoplugs_price_container', 50 );

    function inoplugs_price_container()
    {
    echo "<div class='price_container'>";
    woocommerce_template_single_price($post, $product);
    echo "</div>";
    }

    You can change the hook from “woocommerce_after_add_to_cart_button” to “woocommerce_before_add_to_cart_button” if you like.

    #87572

    Hi Peter,

    thanks for the workout but it did not handle anything.

    i revert the first change

    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10, 2);

    back into the config.php at line where it was before. than i added your code solution at the buttom. Refresing browser a.s.o…but .nothing changes the situation. Like it was before the price in the single page product (product without variants) will not be shown.

    If you look at the page pls take notice that i now changed back to the first changes you offered me to do but it is not the happy end way. Maybe there is a part of code missing in your second option? Did you tried this code solution at your theme presentation? Did it work?

    #87573

    Hey!

    I removed the is_object check from the code. Please try it again.

    Best regards,

    Peter

    #87574

    Hi Peter,

    thank you very much for your support. There is still no change at the product detail page. Changing the hook from “woocommerce_after_add_to_cart_button” to “woocommerce_before_add_to_cart_button also did not work. Maybe we need a deeper look into the theme code of the file(s) regarding to woocommerce functionality?

    Best regards,

    Jan

    #87575

    I tested:

    add_action( 'woocommerce_before_add_to_cart_button', 'inoplugs_price_container', 50 );

    function inoplugs_price_container()
    {
    echo "<div class='price_container'>";
    woocommerce_template_single_price($post, $product);
    echo "</div>";
    }

    and it works for me. Maybe try to add following css code to css/custom.css:

    #top .template-shop-single .price_container {
    line-height: 1em;
    position: relative;
    }

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

The topic ‘How to show product price on product detail page?’ is closed to new replies.