-
AuthorPosts
-
July 17, 2018 at 11:54 am #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
July 17, 2018 at 2:41 pm #986448Hey 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.- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- 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 ). - Click ” Submit “.
- 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,
NikkoJuly 18, 2018 at 4:58 pm #987092Just send you a login, thanks in advanced.
Best regards KiM ✌️
July 20, 2018 at 2:54 pm #987865Hi,
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,
IsmaelJuly 24, 2018 at 1:11 pm #989153Yes, but not the BASE Price! Thats my problem. ;-)
July 24, 2018 at 1:12 pm #989154In Europe it is mandatory to show the Base Price per Liter, kilogramm, etc…
July 25, 2018 at 6:33 am #989495Hi,
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,
IsmaelJuly 26, 2018 at 1:18 pm #990235Hi 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
July 29, 2018 at 8:31 pm #991283Hi,
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,
BasilisAugust 17, 2018 at 4:29 pm #998497Hi 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?August 18, 2018 at 7:59 pm #998755Hi 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,
VictoriaAugust 29, 2018 at 6:05 pm #1003230ok, 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?
August 29, 2018 at 6:40 pm #1003236And why does the “add to cart” button disappear with Enfold and how can I get it back?
August 29, 2018 at 6:43 pm #1003237or should I open another topic for the Cart btn?
August 30, 2018 at 8:58 am #1003441Hi,
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,
IsmaelAugust 31, 2018 at 12:58 pm #1004073Thank 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… 😳
September 1, 2018 at 6:55 pm #1004443Hi,
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,
DudeSeptember 4, 2018 at 8:37 pm #1005757Hi 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!! 🙏
September 5, 2018 at 10:49 am #1005986Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.