Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #986370

    Hello,
    I’m sorry but I can’t find the solution, how to show the base price in the masonry gallery (product type, like https://kriesi.at/themes/enfold-hotel/ “Available Romms” of the homepage).

    Thank you for your help.

    Best KiM

    #986448

    Hey KiM,

    It should just appear as long as the Entries (in Which Entries field) are products.
    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( do be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #987092

    Just send you a login, thanks in advanced.

    Best regards KiM ✌️

    #987865

    Hi,

    Thank you for the update.

    The prices of the product items in the masonry element are displaying properly. Please check the test page. (see private field)

    Best regards,
    Ismael

    #989153

    Yes, but not the BASE Price! Thats my problem. ;-)

    #989154

    In Europe it is mandatory to show the Base Price per Liter, kilogramm, etc…

    #989495

    Hi,

    You have to modify the config-templatebuilder > avia-shortcodes > av-helper-masonry.php file. Look for this code around line 600.

    $this->loop[$key]['text_after'] .= '<span class="av-masonry-price price">'.$product->get_price_html()."</span>";
    

    Best regards,
    Ismael

    #990235

    Hi Ismael,

    thank you for your answer. If I do the change there it is not Update Save, right? If not do you have a hint for me to do it save?
    and do you know the Variable (?) for the base price? Like .$product->get_price_html(). for the price?

    Thank you so much.

    Best regards KiM

    #991283

    Hi,

    global $woocommerce;
    $product_variation = new WC_Product_Variation($_POST[‘variation_id’]);
    $regular_price = $product_variation->regular_price;

    You can use the following, to have 2 different prices based on either variation or regular price!

    Best regards,
    Basilis

    #998497

    Hi Basilis,

    thanks for your reply. I do this in config-templatebuilder > avia-shortcodes > av-helper-masonry.php, right?
    But if I do the change there it is not Update Save, isn´t it?

    #998755

    Hi Blatze,

    Right, you need to copy the file to your child theme and make changes there.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1003230

    ok, copied it to the child Theme and tried to change span class=”av-masonry-price price” to span class=”av-masonry-price price kim”. But it didn´t work. I tried to copy the php file direct to the theme and with the same path (config-templatebuilder > avia-shortcodes > av-helper-masonry.php)
    Both doesn´t work for me.

    Tried to make a change in the main theme: worked.. but this is not updatesave.. is it possible to do changes there, updatesave in the child theme? If yes, can someone tell me what I do wrong?

    #1003236

    And why does the “add to cart” button disappear with Enfold and how can I get it back?

    #1003237

    or should I open another topic for the Cart btn?

    #1003441

    Hi,

    You have to enable the shortcodes in the child theme first.

    // https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#add-elements-to-alb

    After adding that filter in the functions.php file, create a folder called “shortcodes” inside the child theme directory and then move the av-helper-masonry.php file inside. You can do the modifications after that.

    Best regards,
    Ismael

    #1004073

    Thank you guys!! You are awesome!!!
    I can make changes now!! very cool! 😎

    $this->loop[$key][‘text_after’] .= ‘<span class=”av-masonry-price price”>’.$product->get_price_html().”</span>”;
    But:
    How can I get the base price behind the price?

    Thank you so much! 🙌

    PS: Sorry for my superficial knowledge… 😳

    #1004443

    Hi,

    As far as I know WooCommerce does not offer a base price calculation out of the box. You can install a plugin like German market: https://marketpress.de/ which adds a price per unit settings tab to products. You can then replace the default price code:

    
    $this->loop[$key]['text_after'] .= '<span class="av-masonry-price price">'.$product->get_price_html()."</span>";
    

    with this one

    
    
    
    if(class_exists('WGM_Price_Per_Unit'))
    {
    	$this->loop[$key]['text_after'] .= '<span class="av-masonry-price price">'.$product->get_price_html()." ".WGM_Price_Per_Unit::get_price_per_unit_string($product)."</span>";
    }
    else
    {
    
    	$this->loop[$key]['text_after'] .= '<span class="av-masonry-price price">'.$product->get_price_html()."</span>";
    }
    

    to show the base price.

    Best regards,
    Dude

    #1005757

    Hi Dude,

    thanks for your help, I already use a plugin for this Germanized https://vendidero.de/erweiterungen/plugins
    Do you also know the code for this?

    Thank you so much!! 🙏

    #1005986

    Hi,

    I’m not familiar with Germanized but you can ask the plugin author which function you can use to replace the German Marketpress code:

    
    WGM_Price_Per_Unit::get_price_per_unit_string($product)
    

    Best regards,
    Dude

Viewing 19 posts - 1 through 19 (of 19 total)
  • You must be logged in to reply to this topic.