Product page has errors after upgrading to VM 4.2.0.10905
Deprecated: Required parameter $htmlIn follows optional parameter $selected in /home/viinis/domains/virtuvinis.lt/public_html/plugins/vmshipment/rules_shipping_advanced/rules_shipping_base.php on line 491
Deprecated: Required parameter $shipCounter follows optional parameter $cart_prices in /home/viinis/domains/virtuvinis.lt/public_html/plugins/vmshipment/rules_shipping_advanced/rules_shipping_base.php on line 515
PS:
Errors were given by a third-party plugin VM Shipment - Advanced Shipping by Rules for VirtueMart, which was not used, but was published.
Removing the plugin solved the problem.
Thank you, the plugin is now part of the core, fixed.
Advanced Order Numbers ( https://www.open-tools.net/virtuemart/advanced-ordernumbers.html (https://www.open-tools.net/virtuemart/advanced-ordernumbers.html) ) would be also a great addition to VM.
agree - almost always asked by clients why the order/invoice numbers are random and asked for sequential...
Please use https://extensions.virtuemart.net/shopper-order/orders/automated-numbers-detail
As far as I know it works almost with the same princip as the old ordernumber, but you can also modify a lot others
Username
Name
Password
Shoppernumber
Invoicenumber
Ordernumber
Quote from: GJC Web Design on August 15, 2023, 14:11:39 PM
agree - almost always asked by clients why the order/invoice numbers are random and asked for sequential...
They are not random. They have for security reasons 2 random chars, as far as I know. and both have a sequential number on default core
Quote from: Milbo on August 13, 2023, 19:57:03 PM
Thank you, the plugin is now part of the core, fixed.
What do you mean by that? "the plugin is now part of the core"
I have the same issues. While I could fix line 491, I cannot figure out line 515.
Both problems are fixed in the core version.
it is now part of the core. A member payed for it. I think a silvermembership. Or gold, it was not that expensive to update the plugin to work with j4, Php8.2 and vm4.0.22.
I wonder about the messages, because both is fixed, by
public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected, &$htmlIn) {
and
function plgVmOnCheckAutomaticSelectedShipment (VirtueMartCart $cart, array $cart_prices, &$shipCounter) {
Quote from: ViPeS on August 12, 2023, 10:48:40 AM
PS:
Errors were given by a third-party plugin VM Shipment - Advanced Shipping by Rules for VirtueMart, which was not used, but was published.
Removing the plugin solved the problem.
]
Hmm, should be installed unpublished, like the payments. Going to check this.[/code]
I am still getting this error:
Deprecated: Required parameter $shipCounter follows optional parameter $cart_prices in plugins\vmshipment\rules_shipping_advanced\rules_shipping_base.php on line 515
array $cart_prices
That just says it must be an array. Maybe you must remove the array for your php versoin (which one btw).
PHP 8.0.28
Hmm, Does it work for you, if you remove the "array" from the seconed parameter?
Quote from: Milbo on August 21, 2023, 20:50:32 PM
Hmm, Does it work for you, if you remove the "array" from the seconed parameter?
I am not a programmer.
How do I remove that and with what do I have to replace it?
Quote from: Milbo on August 21, 2023, 20:28:34 PM
function plgVmOnCheckAutomaticSelectedShipment (VirtueMartCart $cart, array $cart_prices, &$shipCounter) {
So just
function plgVmOnCheckAutomaticSelectedShipment (VirtueMartCart $cart, $cart_prices, &$shipCounter) {
The code I have currently in under line 515 is this
function plgVmOnCheckAutomaticSelectedShipment (VirtueMartCart $cart, array $cart_prices = array(), &$shipCounter) {
There are two arrays in it.
Quote from: Milbo on August 21, 2023, 20:50:32 PM
Hmm, Does it work for you, if you remove the "array" from the seconed parameter?
The error
Deprecated: Required parameter $shipCounter follows optional parameter
$cart_prices in /home/viinis/domains/virtuvinis.lt/public_html/plugins/vmshipment/rules_shipping_advanced/rules_shipping_base.php on line
515is gone.
But error
Deprecated: Required parameter $htmlIn follows optional parameter
$selected in /home/viinis/domains/virtuvinis.lt/public_html/plugins/vmshipment/rules_shipping_advanced/rules_shipping_base.php on line
491remained
* @author Valerie Isaksen
* @author Max Milbers
*/
public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected = 0, &$htmlIn) {
return $this->displayListFE ($cart, $selected, $htmlIn);
}
Replaced
$selected = 0, with
$selected, — and the error disappeared
Quote from: ViPeS on August 21, 2023, 22:25:02 PM
Quote from: Milbo on August 21, 2023, 20:50:32 PM
Hmm, Does it work for you, if you remove the "array" from the seconed parameter?
The error
Deprecated: Required parameter $shipCounter follows optional parameter $cart_prices in /home/viinis/domains/virtuvinis.lt/public_html/plugins/vmshipment/rules_shipping_advanced/rules_shipping_base.php on line 515
is gone.
But error
Deprecated: Required parameter $htmlIn follows optional parameter $selected in /home/viinis/domains/virtuvinis.lt/public_html/plugins/vmshipment/rules_shipping_advanced/rules_shipping_base.php on line 491
remained
* @author Valerie Isaksen
* @author Max Milbers
*/
public function plgVmDisplayListFEShipment (VirtueMartCart $cart, $selected = 0, &$htmlIn) {
return $this->displayListFE ($cart, $selected, $htmlIn);
}
Replaced $selected = 0, with $selected, — and the error disappeared
The line in my file looks totally different.
Looks like the server did not update your files, for whatever reason.
ViPes also your line is fixed in the core code, hmmm.
He is talking about line 491.
I am line 515 with the issue.
I don't have issue with line 491.
Deprecated: Required parameter $shipCounter follows optional parameter $cart_prices in G:\XAMPP\htdocs\cnp\plugins\vmshipment\rules_shipping_advanced\rules_shipping_base.php on line 515