More than 9 shipping methods are required at the customer's site due to different service providers and the number of different delivery times.
When we added the shipping methods to the payment methods, it did not save all of them, even though we tried several times.
In the phocacart_payment_method_shipping table in the database, we saw that we had the shipping methods assigned, as many as we had originally assigned, but for some reason the shipping_id had 1 in many cases.
Looking at the source code, we found out why.
The relevant code snippet:
components/com_phocacart/libraries/phocacart/shipping/shipping.php:735
/* used as payment rule*/
public static function storeShippingMethods($shippingsArray, $id, $table = 'payment') {
.....
foreach($shippingsArray as $k => $v) {
$values[] = ' ('.(int)$id.', '.(int)$v[0].')';
}
Here in $values[] = ' ('.(int)$id.', '.(int)$v[0].')'; is it intentional to only pass the first character to the second variable, or is it a bug?
More than 9 shipping methods - bug or feature
-
- Phoca Newbie
- Posts: 2
- Joined: 18 Jun 2024, 23:58
- Jan
- Phoca Hero
- Posts: 48345
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: More than 9 shipping methods - bug or feature
Hi, which version of Phoca Cart do you use?
This was fixed in latest 5.0.0 Beta versions. So yes, this needs to be modified if some previous version is used:
Jan
This was fixed in latest 5.0.0 Beta versions. So yes, this needs to be modified if some previous version is used:
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 18 Jun 2024, 23:58
Re: More than 9 shipping methods - bug or feature
4.0.10
Thank you, I have already modified it yesterday.
Then we'll wait for the non-beta update.
Thank you, I have already modified it yesterday.
Then we'll wait for the non-beta update.
- Jan
- Phoca Hero
- Posts: 48345
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: More than 9 shipping methods - bug or feature
OK
If you find Phoca extensions useful, please support the project