roadlink
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Numerous Warnings on product loopshi.
this errors happens when you have woocommerce 9.4.1 or above and default sorting.
Appearance > Customize > WooCommerce > Product CatalogForum: Plugins
In reply to: [WooCommerce] Numerous Warnings on product loopshi all,
I am not sure if woocommerce team will fix it.
But here is the fix;
Basically we will check if $orderby data is there.
// Ensure $orderedby is defined.
if ( ! isset( $orderedby ) ) {
$orderedby = ”;
}
1. copy and paste the file under your child theme’s folder.
wp-content/themes/your-child-theme/woocommerce/loop/result-count.php
2. Open the file under your theme and use below codes.<?php
/**
* Result Count
*
* Shows text: Showing x - x of x results.
*
* This template can be overridden by copying it to yourtheme/woocommerce/loop/result-count.php.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 9.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Ensure $orderedby is defined.
if ( ! isset( $orderedby ) ) {
$orderedby = '';
}
?>
<p class="woocommerce-result-count" <?php echo ( empty( $orderedby ) || 1 === intval( $total ) ) ? '' : 'role="alert" aria-relevant="all" data-is-sorted-by="true"'; ?>>
<?php
// phpcs:disable WordPress.Security
if ( 1 === intval( $total ) ) {
_e( 'Showing the single result', 'woocommerce' );
} elseif ( $total <= $per_page || -1 === $per_page ) {
$orderedby_placeholder = empty( $orderedby ) ? '%2$s' : '<span class="screen-reader-text">%2$s</span>';
/* translators: 1: total results 2: sorted by */
printf( _n( 'Showing all %1$d result', 'Showing all %1$d results', $total, 'woocommerce' ) . $orderedby_placeholder, $total, esc_html( $orderedby ) );
} else {
$first = ( $per_page * $current ) - $per_page + 1;
$last = min( $total, $per_page * $current );
$orderedby_placeholder = empty( $orderedby ) ? '%4$s' : '<span class="screen-reader-text">%4$s</span>';
/* translators: 1: first result 2: last result 3: total results 4: sorted by */
printf( _nx( 'Showing %1$d–%2$d of %3$d result', 'Showing %1$d–%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ) . $orderedby_placeholder, $first, $last, $total, esc_html( $orderedby ) );
}
// phpcs:enable WordPress.Security
?>
</p>Forum: Plugins
In reply to: [WooCommerce] Numerous Warnings on product loopsI have exactly same errors on both of my websites.
php 8.3
latest wp and woo- ?Nov 16, 23:14:44Warning: foreach()?argument must be of type array|object, null given in?/wp-content/plugins/scalability-pro/super-speedy-settings.php on line 17
- ?Nov 16, 23:14:42Warning: Undefined variable $orderedby in?/wp-content/plugins/woocommerce/templates/loop/result-count.php on line 38
- ?Nov 16, 23:14:42Warning: Undefined variable $orderedby in?/wp-content/plugins/woocommerce/templates/loop/result-count.php on line 32
- ?Nov 16, 23:14:41Warning: Undefined variable $orderedby in?/wp-content/plugins/woocommerce/templates/loop/result-count.php on line 38
- ?Nov 16, 23:14:41Warning: Undefined variable $orderedby in?/wp-content/plugins/woocommerce/templates/loop/result-count.php on line 32
Forum: Plugins
In reply to: [GutSlider - All in One Block Slider] static slider responsive issueany update?
I asked hosting company to run search replace command on sql. other options didn’t work for me.
I still don’t get why plugin create file name with capitals.find this
// Vivino prices
$product_data['vivino_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['price'] ) ) );
$product_data['vivino_regular_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['regular_price'] ) ) );
if ( $product_data['sale_price'] > 0 ) {
$product_data['vivino_sale_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['sale_price'] ) ) );
if ( isset( $product_data['net_sale_price'] ) ) {
$product_data['vivino_net_sale_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['net_sale_price'] ) ) );
}
}Change with this
// Vivino prices
if ( isset( $product_data['price'] ) ) {
$product_data['vivino_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['price'] ) ) );
}
if ( isset( $product_data['regular_price'] ) ) {
$product_data['vivino_regular_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['regular_price'] ) ) );
}
if ( isset( $product_data['sale_price'] ) && $product_data['sale_price'] > 0 ) {
$product_data['vivino_sale_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['sale_price'] ) ) );
if ( isset( $product_data['net_sale_price'] ) ) {
$product_data['vivino_net_sale_price'] = floatval( str_replace( ',', '.', str_replace( ',', '.', $product_data['net_sale_price'] ) ) );
}
}Orders menu is there but when click it, ,it is white page and authority message
weird, when I do these settings, I couldn’t reach the order page. It shows me error.
I tried again but I got authorization error on orders page.
Do you able to test it now if it is working with latest woocommerce?Hi again,
Thanks for reply.
In the article it mentions we should install permissions plugin. But later I don’t see anything related with that plugin.
Also,
“Go to “Capabilities” then “Admin Menus” in your WordPress admin menu.”
This step is not allowing me choose posts but asking to buy pro plugin.hi,
Is there any update on this issue?
ThanksSure,
editing : All empty
https://prnt.sc/SI7tveETk8Oudeletion : All empty
https://prnt.sc/Frpr59NnbnyTreading : Allowed
https://prnt.sc/feelKQ6KHaqgadmin section
https://prnt.sc/gePObuCzdTbNForum: Plugins
In reply to: [GutSlider - All in One Block Slider] static slider responsive issuethat would be great, free or pro version both can be Ok
But I don’t use sale price.
Which means it is empty for all products.
I also don’t use sale price related items in feed.
If I exclude sale price empty product, it will mean exclude all products?
PS: I use same template since weeks, this happened after new updatesHi there,
I also found some records on wp-options table.
Should I rename them too?
What I want is to see all lower cases in URL.- This reply was modified 1 month, 1 week ago by roadlink.