As previously announced via banners and our newsletters, support is no longer available through this platform.
For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.
You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.
Paid customers: Please log in to your store account for support.
Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com
First of all, thank you for the great plugin! We've just started our business and it's been a great start, our customers have specifically mentioned how great it is being able to book cleaning services this easily!
Now, I'm not a coder but I've leveraged AI to create some other scripts that has worked in cart. For example I have a script that adds a material cost, depending on the subtotal of the product made by Amelia.
(I'm selling cleaning services)
Now, we've expanded and when customers books in Amelia, they can choose between many nearby cities. Some cities are 30-50 minutes away, and I would like to add a transportation cost (a virtual product) depending on what city they choose.
I've tried the WP Hooks like amelia_after_location_added but it doesn't seem to work. I assume it's because when in cart page, there hasn't been a booking added yet? An example of code I've tried:
function add_transportation_fee_for_falun($location) {
// Check if the location is "Falun"
if (stripos($location, 'Falun') !== false) {
// Product ID for the transportation fee $product_id = 5424; $price = 80;
// Get the product $product = wc_get_product($product_id);
// Ensure the product exists and is valid
if ($product) {
// Add the product to the cart with the specified price
$cart_item_data = array(
'price' => $price,
'custom_price' => $price,
);
WC()->cart->add_to_cart($product_id, 1, 0, array(), $cart_item_data);
}
}
}
// Hook into Amelia's action after location is added
add_action('amelia_after_location_added', 'add_transportation_fee_for_falun', 10, 1);
I've also tried it simplified to just echo "city found", but it never fires. I'm not really asking you to figure out the code for me but perhaps point me in the right direction on how I can go about identifying the city in the cart page, so that I can add a transportation cost?
Hi Gustav,
Thanks for reaching out to us. There might be a possibility to configure this, but I would need to consult the developers since it requires a bit of thinking "outside of the box" in terms of technical details. I will certainly let you know as soon as I have more information.
Thank you for your patience and understanding.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Gustav,
You can try something like this:
Use the amelia_before_wc_cart_filter filter, which is triggered just before the WooCommerce cart. You can find the selected location ID here.
Then, based on the product ID for that location, you can add it to the cart.
Hope this helps.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thank you so much!! It works now and it adds transportation costs depending on what city customers choose. Adding the price with the code didn't work, so I did this instead. Created virtual transportation-cost products for each city, with a fixed price on each. (originally I had 1 "transportation cost" product with a price of 0, and hoped the code would set it's price). So code looks like this
Hi Gustav,
Great to hear that! Thanks for the feedback. I will leave this ticket on Public so other users can see the workaround. Anyway, let us know if you have any other questions or issues and we will kindly assist.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables