- Posts: 7
- Thank you received: 0
Any questions about Documents Sellers, post it here .
Unknown column 'download_code' etc
- Daniele Grassi
- Topic Author
- Offline
- New Member
Less
More
14 years 6 months ago #3235
by Daniele Grassi
Unknown column 'download_code' etc was created by Daniele Grassi
When a user completes the order form and presses "Submit", this error is shown:
No valid database connection Unknown column 'download_code' in 'where clause' SQL=SELECT COUNT(*) FROM jos15_dms_orders WHERE download_code="Zbco4znTpV"
After that, the user is redirected to Paypal correctly and can complete the payment...
I'll try to add the column to the table, but I guess it's something not normal...
No valid database connection Unknown column 'download_code' in 'where clause' SQL=SELECT COUNT(*) FROM jos15_dms_orders WHERE download_code="Zbco4znTpV"
After that, the user is redirected to Paypal correctly and can complete the payment...
I'll try to add the column to the table, but I guess it's something not normal...
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
14 years 6 months ago #3236
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re:Unknown column 'download_code' etc
Hi
It is something not normal . If you want , send me administrator account of the site so that I can check it for you .
Thanks ,
Tuan
It is something not normal . If you want , send me administrator account of the site so that I can check it for you .
Thanks ,
Tuan
Please Log in or Create an account to join the conversation.
- Daniele Grassi
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
14 years 6 months ago #3237
by Daniele Grassi
Replied by Daniele Grassi on topic Re:Unknown column 'download_code' etc
Problem is here (models/checkout.php):
In my installation, the table dms_orders has a license_code column, not a download_code one.
Is this right?
Code:
function processOrder(&$data) {
jimport('joomla.user.helper') ;
require_once JPATH_COMPONENT.DS.'helper'.DS.'os_cart.php';
global $Itemid;
$cart = new DMSCart();
$ids = $cart->getItems();
$siteUrl = JURI::root();
$config = DMSHelper::getConfig();
$user = & JFactory::getUser();
jimport('joomla.user.helper');
$data['transaction_id'] = strtoupper(JUserHelper::genRandomPassword());
$licenseCode = '';
while(true) {
$licenseCode = JUserHelper::genRandomPassword(10) ;
$sql = 'SELECT COUNT(*) FROM #__dms_orders WHERE download_code="'.$licenseCode.'"';
$this->_db->setQuery($sql) ;
$total = $this->_db->loadResult();
if (!$total)
break ;
}
In my installation, the table dms_orders has a license_code column, not a download_code one.
Is this right?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
14 years 6 months ago #3238
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re:Unknown column 'download_code' etc
Hi
Thanks for finding out the error . Yes , we need to modify the command from :
To
I updated the modification to download package . You can download it and re-install it on your site .
Sorry for the issue and thanks again !
Tuan
Thanks for finding out the error . Yes , we need to modify the command from :
Code:
$sql = 'SELECT COUNT(*) FROM #__dms_orders WHERE download_code="'.$licenseCode.'"';
To
Code:
$sql = 'SELECT COUNT(*) FROM #__dms_orders WHERE license_code="'.$licenseCode.'"';
I updated the modification to download package . You can download it and re-install it on your site .
Sorry for the issue and thanks again !
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.