no PDF in email

  • Posts: 64
  • Thank you received: 3
  • Hikashop Business
6 years 5 months ago #293670

-- url of the page with the problem -- : www.picton.place
-- HikaShop version -- : 3.4.0
-- HikaSerial version -- : 2.1.1
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.2
-- Error-message(debug-mod must be tuned on) -- : SQL syntax error

Hi there,
I've linked serial numbers with some products like tickets or coupons.. I use PDFserial to attach a PDF to the confirmation email. That worked very well till now. And that stopped working now. A serial is still generated and linked with the product, but there is no PDF in the email. When i send an email again from the backend the error message appears.



After reading some posts i followed some of your instructions to find out the details of what happens. Here is the debug-information:

Es ist ein Fehler aufgetreten!
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SELECT * FROM a48ra_hikamarket_vendor AS v INNER JOIN a48ra_hikashop_product AS p ON p.product_vendor_id = v.vendor_id WHERE p.product_id =
/home/.sites/289/site7648830/web/libraries/joomla/database/driver/mysqli.php:650
Call stack
# Function Location
1 () JROOT/libraries/joomla/database/driver/mysqli.php:650
2 JDatabaseDriverMysqli->execute() JROOT/libraries/joomla/database/driver.php:1652
3 JDatabaseDriver->loadObject() JROOT/administrator/components/com_hikaserial/classes/order.php:1232
4 hikaserialOrderClass->retrieveConvertedData() JROOT/plugins/hikaserial/pdfserial/pdfserial.php:268
5 plgHikaserialPdfserial->loadData() JROOT/plugins/hikaserial/pdfserial/pdfserial.php:216
6 plgHikaserialPdfserial->generateData() JROOT/plugins/hikaserial/pdfserial/pdfserial.php:135
7 plgHikaserialPdfserial->onBeforeSerialMailSend() JROOT/libraries/joomla/event/event.php:70
8 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
9 JEventDispatcher->trigger() JROOT/administrator/components/com_hikaserial/classes/mail.php:118
10 hikaserialMailClass->beforeMailSend() JROOT/plugins/hikashop/serials/serials.php:377
11 plgHikashopSerials->onBeforeMailSend() JROOT/libraries/joomla/event/event.php:70
12 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
13 JEventDispatcher->trigger() JROOT/administrator/components/com_hikashop/classes/mail.php:765
14 hikashopMailClass->preProcessMail() JROOT/administrator/components/com_hikashop/classes/mail.php:787
15 hikashopMailClass->sendMail() JROOT/administrator/components/com_hikashop/controllers/order.php:347
16 OrderController->savemail() JROOT/libraries/src/MVC/Controller/BaseController.php:710
17 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:1885
18 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:71
19 require_once() JROOT/libraries/src/Component/ComponentHelper.php:382
20 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:357
21 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
22 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
23 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:195
24 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51

Hope you can help
greetings
Peter

Attachments:
Last edit: 6 years 5 months ago by seitenspieler.

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
6 years 5 months ago #293687

Hello,

In the HikaSerial order class you have to replace the line

$query = 'SELECT * FROM '.hikamarket::table('vendor').' AS v INNER JOIN '.hikamarket::table('shop.product').' AS p ON p.product_vendor_id = v.vendor_id WHERE p.product_id = '.$serial->product_id;
By
$query = 'SELECT * FROM '.hikamarket::table('vendor').' AS v INNER JOIN '.hikamarket::table('shop.product').' AS p ON p.product_vendor_id = v.vendor_id WHERE p.product_id = '.(int)$object->product_id;
We will also include that patch in the next build.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 3
  • Hikashop Business
6 years 5 months ago #293710

Thank you Jerome for your answer.

Can you give me please an assistance, where to find the right php file?

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
6 years 5 months ago #293711

Hello,

From your call stack, you can find it :

JROOT/administrator/components/com_hikaserial/classes/order.php:1232
So the line I'm talking about is just before the line 1232 of that file.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: seitenspieler

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 3
  • Hikashop Business
6 years 5 months ago #293732

Thanks for the quick support - it works again.
greetings
Peter

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.077 seconds
Powered by Kunena Forum