While this sql-query is a bit unlucky built, I have tried it and it works.
Could it be another mod?
Could it be another mod?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
That code may error if a string and not an integer is being passed as product_id.frankleng wrote:I'm a little lucky. It takes me little time to find it in a mod,Simply search with a qualified editor for:in all files you have on your server / shop.Code: Select all
SELECT date_end FROM
May need a few seconds, but you will find that phrase.
http://www.opencart.com/index.php?route ... _license=0i'm not sure it's this mod triggered the error, It's appreciated if you can tell me the solution. Thanks.Code: Select all
<?php class ModelModuleSpecialPriceCountDown extends Model { public function getSpecialPriceEndData($product_id) { if ($this->customer->isLogged()){ $customer_group_id = $this->customer->getCustomerGroupId(); } else { $customer_group_id = 0; } $sql = "SELECT date_end FROM " . DB_PREFIX . "product_special WHERE product_id ='" . $product_id . "' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority "; if ($customer_group_id){ $sql .= " AND customer_group_id ='" . $customer_group_id . "'"; } $sql .= "LIMIT 0,1"; $query = $this->db->query($sql); if ($query->num_rows){ return $query->row['date_end']; } else { return 0; } } } ?>
Try changing
Code: Select all
WHERE product_id ='" . $product_id . "' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority ";
Code: Select all
WHERE product_id ='" . (int)$product_id . "' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority ";
And you could also change
Code: Select all
$sql .= " AND customer_group_id ='" . $customer_group_id . "'";
Code: Select all
$sql .= " AND customer_group_id ='" . (int)$customer_group_id . "'";
This error comes out occassionally. Actually, I don't know what operation triggered this. Thanks for your attention.OSWorX wrote:While this sql-query is a bit unlucky built, I have tried it and it works.
Could it be another mod?
Thank you very much. I've done this.ADD Creative wrote:That code may error if a string and not an integer is being passed as product_id.frankleng wrote:I'm a little lucky. It takes me little time to find it in a mod,Simply search with a qualified editor for:in all files you have on your server / shop.Code: Select all
SELECT date_end FROM
May need a few seconds, but you will find that phrase.
http://www.opencart.com/index.php?route ... _license=0i'm not sure it's this mod triggered the error, It's appreciated if you can tell me the solution. Thanks.Code: Select all
<?php class ModelModuleSpecialPriceCountDown extends Model { public function getSpecialPriceEndData($product_id) { if ($this->customer->isLogged()){ $customer_group_id = $this->customer->getCustomerGroupId(); } else { $customer_group_id = 0; } $sql = "SELECT date_end FROM " . DB_PREFIX . "product_special WHERE product_id ='" . $product_id . "' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority "; if ($customer_group_id){ $sql .= " AND customer_group_id ='" . $customer_group_id . "'"; } $sql .= "LIMIT 0,1"; $query = $this->db->query($sql); if ($query->num_rows){ return $query->row['date_end']; } else { return 0; } } } ?>
Try changingtoCode: Select all
WHERE product_id ='" . $product_id . "' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority ";
Note the (int) before $product_id.Code: Select all
WHERE product_id ='" . (int)$product_id . "' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority ";
And you could also changetoCode: Select all
$sql .= " AND customer_group_id ='" . $customer_group_id . "'";
Depending on how the method is used, there could also be a chance on SQL injection.Code: Select all
$sql .= " AND customer_group_id ='" . (int)$customer_group_id . "'";
Hi, i think my paypal mismatch problem is perfectly solved.
However, I still got this error:
2014-10-13 3:01:41 - PP_STANDARD :: IPN RESPONSE: VERIFIED
2014-10-13 3:01:41 - PP_STANDARD :: RECEIVER EMAIL MISMATCH! xxxxxx@hotmail.com
I have checked that the OC amount is same with Paypal amount now. No problem.
But, i still see thiis error at backend of OC.
Does this really mean I need to use the same email address in Opencart to get notice and in paypal as primary address to get paid?
i used to set the same email address for notice and getting paid, at that time oc amount and paypal amount mismatch, same error happens, what's the problem now?
Here is amount, i notice that the subtotal is not match, will paypal check that?:
However, I still got this error:
2014-10-13 3:01:41 - PP_STANDARD :: IPN RESPONSE: VERIFIED
2014-10-13 3:01:41 - PP_STANDARD :: RECEIVER EMAIL MISMATCH! xxxxxx@hotmail.com
I have checked that the OC amount is same with Paypal amount now. No problem.
But, i still see thiis error at backend of OC.
Does this really mean I need to use the same email address in Opencart to get notice and in paypal as primary address to get paid?
i used to set the same email address for notice and getting paid, at that time oc amount and paypal amount mismatch, same error happens, what's the problem now?
Here is amount, i notice that the subtotal is not match, will paypal check that?:
It does not matter that the sub-totals do not match (and they probably never will).
You need to set your email address that is registered with PayPal in the PayPal Standard settings page of OpenCart. This does not need to be the same as the one set in the General Settings.
You need to set your email address that is registered with PayPal in the PayPal Standard settings page of OpenCart. This does not need to be the same as the one set in the General Settings.
I have paypal account linked with more than 3 email addresses, i think anyone is ok for getting paid.ADD Creative wrote:It does not matter that the sub-totals do not match (and they probably never will).
You need to set your email address that is registered with PayPal in the PayPal Standard settings page of OpenCart. This does not need to be the same as the one set in the General Settings.
As you said, i have set it right in PP standard setting page of OC.
I'm wondering whether customers will still see an error message from paypal when this error is still logged at OC backend.
Because i was reminded once before from customer. He said, when checking out with paypal, there is error, but he did paid, asking me to check that order.
Dose the email address in the "PP_STANDARD :: RECEIVER EMAIL MISMATCH!" log massage match the one set in OpenCart's PayPal settings?
If it does then the issue is still total related. If not the issue is probably with you PayPal settings outside OpenCart.
If it does then the issue is still total related. If not the issue is probably with you PayPal settings outside OpenCart.
No. in the log message, it's xxx@hotmail.com, while in OpenCart's PayPal settings, it's a different email address i set in paypal for receiving payment. And, i have got the payment in paypal.ADD Creative wrote:Dose the email address in the "PP_STANDARD :: RECEIVER EMAIL MISMATCH!" log massage match the one set in OpenCart's PayPal settings?
If it does then the issue is still total related. If not the issue is probably with you PayPal settings outside OpenCart.
Currently, i set that xxx@hotmail.com as Primary in Paypal account.
and, the other as secondary address for getting money.
Is this caused the problem? The Primary address in paypal should be same with that in OC pp standard setting?
Now, in paypal acount, i set Primary address same as that in opencart pp standard setting.
Maybe, this time paypal will recognize it?
From https://developer.paypal.com/docs/class ... Variables/
If you do want to use another email address also adding a check for "business" in the PayPal Standard Controller may work.
As OpenCart checks "receiver_email" matches the one you have set in its PayPal setting, it looks like you have to use the primary email address.receiver_email Primary email address of the payment recipient (that is, the merchant). If the payment is sent to a non-primary email address on your PayPal account, the receiver_email is still your primary email.
Note: The value of this variable is normalized to lowercase characters.
Length: 127 characters
If you do want to use another email address also adding a check for "business" in the PayPal Standard Controller may work.
business Email address or account ID of the payment recipient (that is, the merchant). Equivalent to the values of receiver_email (if payment is sent to primary account) and business set in the Website Payment HTML.
Note: The value of this variable is normalized to lowercase characters.
Length: 127 characters
My post was deleted (assuming) about the Customer Online Report. I posted yesterday. If it is due to one of these reasons:
If your bug report was deleted, it is because it was either:
- Already Confirmed and added to the list below
- Rejected as a non-issue
- A Duplicate of another bug already mentioned.
I can understand that, but, it would've been nice to be pointed to the specific solution. I am honestly searching the detailed work you guys have put in (thank you for all you do), but still cannot find what I need.
Not sure if it is even against the rules to post this in here. I'm sure I'll find out.
If your bug report was deleted, it is because it was either:
- Already Confirmed and added to the list below
- Rejected as a non-issue
- A Duplicate of another bug already mentioned.
I can understand that, but, it would've been nice to be pointed to the specific solution. I am honestly searching the detailed work you guys have put in (thank you for all you do), but still cannot find what I need.
Not sure if it is even against the rules to post this in here. I'm sure I'll find out.
That would be the one. You posted a reply for the same reason on an already created and not too old topic. Then, you created your own topic for the same reason. The forum notifications will already propagate the fact that you did posted the first time for that same particular reason. That being said, there is absolutely no need and in any case to create a new topic since you already sent your post reply to an existing topic along with it unless the topic is really old.- A Duplicate of another bug already mentioned.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Understood and it makes sense. However, it still doesn't help me with the problem I am facing. I will continue to search for a solution.straightlight wrote:That would be the one. You posted a reply for the same reason on an already created and not too old topic. Then, you created your own topic for the same reason. The forum notifications will already propagate the fact that you did posted the first time for that same particular reason. That being said, there is absolutely no need and in any case to create a new topic since you already sent your post reply to an existing topic along with it unless the topic is really old.- A Duplicate of another bug already mentioned.
Who is online
Users browsing this forum: No registered users and 4 guests