SMFHacks.com
SMF Store => Support => Bugs => Topic started by: KKOG on February 01, 2021, 05:37:51 am
-
Hi,
I have found another bug in the store software when using the Alternative PayPal Address to force a "Buy Now" option.
Using this option applies a Shipping Condition where the condition is based on Weight criteria even though the "Requires Shipping" option has not been ticked. I have applied the previous workaround that overcomes the application of a Shipping Condition which s based on a $ or cost condition.
To overcome this we have had to revert back to the use of the cart.
Regards
Greg Ralph
KKOG Forum Admin
-
Try this hotfix
Open Sources/Store2.php
In function CreatePayPalButton($basketid)
Find
// Lookup the item information
$dbresult = $smcFunc['db_query']('', "
SELECT
subscribe_cycle_times, subscribe_cycle_duration, subscribe_cycle_type,
second_paypal, productname
FROM {db_prefix}store_item
WHERE ID_ITEM = " . $cartRow['ID_ITEM'] );
$itemRow = $smcFunc['db_fetch_assoc']($dbresult);
$smcFunc['db_free_result']($dbresult);
if (!empty($itemRow['second_paypal']))
$business = $itemRow['second_paypal'];
Change to
// Lookup the item information
$dbresult = $smcFunc['db_query']('', "
SELECT
subscribe_cycle_times, subscribe_cycle_duration, subscribe_cycle_type,
second_paypal, productname, requireshipping
FROM {db_prefix}store_item
WHERE ID_ITEM = " . $cartRow['ID_ITEM'] );
$itemRow = $smcFunc['db_fetch_assoc']($dbresult);
$smcFunc['db_free_result']($dbresult);
if (!empty($itemRow['second_paypal']))
$business = $itemRow['second_paypal'];
if ($itemRow['requireshipping'] == 0)
$basketRow['totalshipping'] = 0;
-
Hi,
Thanks for the hotfix.
Will this be added to a new release of the Store system?
Another workaround was to set the weight criteria to be between 0.01kg and 5.00kg instead of between 0.0kg and 5.0kg.
Cheers
Greg Ralph
KKOG Forum Admin
-
Yes it will be if it works for you.
-
Have tested the Hotfix with weight condition starting with 0 and the shipping condition value is still added to the price on "Buy Now" using alternate PayPal address
Cheers
Greg
-
Can you take a screenshot of your shipping settings and your item settings that has this issue.
-
Hi,
Attached is the screenshot
[attachimg=1]
The offending condition is the between 0.00 and 5.00 kgs condition
Cheers
BTW what is the image attachment mod that you are using?