Home / Forums / WoodMart support forum / Estimated delivery not showing up
Home › Forums › WoodMart support forum › Estimated delivery not showing up
Estimated delivery not showing up
- This topic has 15 replies, 2 voices, and was last updated 1 year, 7 months ago by
gnl-commerce.nl.
-
AuthorPosts
-
November 25, 2024 at 4:34 pm #615655
gnl-commerce.nlParticipantHi there,
I enabled Estimated delivery in theme settings, i also configured the zones already and i setup the estimated delivery so it should show the estimated delivery on the zones on specific product categories. (I added screenshots)
I also added the estimated delivery widget on single product page.
Unfortunately i don’t see the estimated delivery on product archive on the category pages, the single product page, minicart, and the other pages.
Can you help me fix this?
Attachments:
You must be logged in to view attached files.November 25, 2024 at 6:28 pm #615714Hello,
Firstly, you need to select a right shipping method and zone on the cart page. But this method is not selected and is even hidden with some of the installed plugins https://monosnap.com/file/RbHS7o8mXvWiAzPPZYdW144pZ0BOAY
Kind Regards
November 25, 2024 at 6:40 pm #615723
gnl-commerce.nlParticipantI already checked, but its not hidden. The shipping options are just setup like this:
Free shipping if you pickup the goods yourself, and otherwise standard shipping cost?
I checked all plugins but its not being hidden.
November 25, 2024 at 6:40 pm #615724
gnl-commerce.nlParticipantAnd also this also doesn’t explain why estimated delivery time is not showing in product archive and minicart?
November 25, 2024 at 6:46 pm #615729Could you please temporarily disable all plugins that are not related to our theme?
November 25, 2024 at 7:04 pm #615735
gnl-commerce.nlParticipantI just did, i enabled everything again. Still not showing up
November 25, 2024 at 7:07 pm #615737
gnl-commerce.nlParticipanti have to backup now site crashed randomly because of disabling plugins
November 25, 2024 at 7:35 pm #615747
gnl-commerce.nlParticipantSite is online again, so disabling plugins didnt help at all fix the problem
November 26, 2024 at 9:49 am #615873In this case, you need to create a staging development copy of your website. There, you will be able to do such kind of experiments without any harm to your production website.
Kind Regards
November 26, 2024 at 12:26 pm #615994
gnl-commerce.nlParticipantI just made a staging, login is the same.
November 26, 2024 at 4:33 pm #616157As we can see, the shipping zone you created the Estimate date rule for is hidden in the child theme. Once we switch to the parent theme, it is possible to select this shipping zone and the Estimated delivery date is shown correctly. Check the following screenshots.
https://monosnap.com/file/ypHanGu1lTC9WCqPA4ffECsUv1u7gJ
https://monosnap.com/file/uR4H86ycyrjPMyytu3nZQkh5Aa2lsCNovember 26, 2024 at 5:31 pm #616193
gnl-commerce.nlParticipantOk i think i see the issue, i have made a code in functions.php. I removed the piece of code underneath here but i really need this code.
function custom_shipping_methods($rates, $package) {
// Verzendklasse IDs
$small_package_class_id = 74; // Verzendklasse ID voor kleine pakketten
$delivery_and_install_class_id = 71; // Verzendklasse ID voor levering plus montage// Controleer of er producten in de bestelling zitten met de verzendklasse
$has_small_package = false;
$has_delivery_and_install = false;
$small_package_total = 0;
$delivery_and_install_total = 0;
$cart_total = 0;foreach (WC()->cart->get_cart() as $cart_item) {
if ($cart_item[‘data’]->get_shipping_class_id() == $small_package_class_id) {
$has_small_package = true;
$small_package_total += $cart_item[‘line_total’];
}
if ($cart_item[‘data’]->get_shipping_class_id() == $delivery_and_install_class_id) {
$has_delivery_and_install = true;
$delivery_and_install_total += $cart_item[‘line_total’];
}
$cart_total += $cart_item[‘line_total’];
}// Aangepaste logica voor kleine pakketten
if ($has_small_package) {
if ($cart_total >= 500) {
foreach ($rates as $rate_key => $rate) {
if (in_array($rate->get_method_id(), [‘flat_rate’, ‘standard_rate’, ‘standard_rate_delivery’])) {
unset($rates[$rate_key]);
}
}
$rates[‘free_shipping’] = new WC_Shipping_Rate(
‘free_shipping’,
__(‘Gratis verzending’),
0,
[],
‘free_shipping’
);
} else {
foreach ($rates as $rate_key => $rate) {
if (in_array($rate->get_method_id(), [‘flat_rate’, ‘free_shipping’, ‘standard_rate_delivery’])) {
unset($rates[$rate_key]);
}
}
$rates[‘standard_rate’] = new WC_Shipping_Rate(
‘standard_rate’,
__(‘Standaard tarief’),
6.75,
[],
‘standard_rate’
);
}
}// Aangepaste logica voor levering plus montage
if ($has_delivery_and_install) {
if ($delivery_and_install_total < 500 && !$has_small_package) {
$rates[‘standard_rate_delivery’] = new WC_Shipping_Rate(
‘standard_rate_delivery’,
__(‘Standaard tarief’),
6.75,
[],
‘standard_rate_delivery’
);
}$rates[‘delivery_install’] = new WC_Shipping_Rate(
‘delivery_install’,
__(‘Levering plus montage’),
75,
[],
‘delivery_install’
);if ($cart_total >= 500) {
foreach ($rates as $rate_key => $rate) {
if ($rate->get_method_id() == ‘standard_rate’) {
unset($rates[$rate_key]);
}
}
}
}return $rates;
}
add_filter(‘woocommerce_package_rates’, ‘custom_shipping_methods’, 10, 2);November 26, 2024 at 5:32 pm #616196
gnl-commerce.nlParticipantThe problem seems to be that the code added in function.php via the woocommerce_package_rates filter can disable other WooCommerce features, which can limit the translation. This may happen because it overrides the shipping methods or because the theme (WoodMart) may rely on certain shipping methods to display shipping costs.
November 26, 2024 at 5:34 pm #616197
gnl-commerce.nlParticipantCan you tell me how i can fix this?
November 26, 2024 at 8:00 pm #616260Hello,
Sorry, but we don’t know how this code is supposed to work and how to fix it. Fixing additional code customizations like that is out of our theme support scope.
Kind Regards
November 27, 2024 at 12:07 pm #616497
gnl-commerce.nlParticipantOk thank you!
-
AuthorPosts
The topic ‘Estimated delivery not showing up’ is closed to new replies.
- You must be logged in to create new topics. Login / Register