Skip to main content

error on discount when selecting vendor

10 years 11 months ago #221996 by Dibben
-- url of the page with the problem -- : backend
-- HikaShop version -- : 2.6.0
-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.4
-- Error-message(debug-mod must be tuned on) -- : Unknown column 'a.user_id' in 'order clause' SQL=SELECT * FROM shd8y_hikamarket_vendor AS a WHERE (a.vendor_id > 1) ORDER BY a.user_id asc LIMIT 0, 25

Hi,

I went to select a vendor so that there was a discount for just that vendor however i now just get an error message
Unknown column 'a.user_id' in 'order clause' SQL=SELECT * FROM shd8y_hikamarket_vendor AS a WHERE (a.vendor_id > 1) ORDER BY a.user_id asc LIMIT 0, 25

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

10 years 11 months ago #222003 by Jerome
Hi,

Please logout from your backend in order to clean your session.
If it does not work ; it could be interesting to delete the cookies for your website.

It looks like there is a "sorting" column stored in the session which is used by two different views.
But, in order to fix the issue ; I'll need to know the very exact place where the error is coming from because there are a lot of places in HikaMarket where that kind of SQL query is made.

Regards,

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

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

10 years 11 months ago #222040 by Dibben
Hi Jerome,

Yes logging out seems to have worked. It happened when i created a coupon and applied it to a specific vendor. When i wanted to sort by ID number (so i could see the most recent vendor more quickly within the lightbox) the error occurred. It then stayed there when i went to the view vendors normally in hikamarket.

Kind regards

Alex

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

10 years 11 months ago #222084 by Jerome
Hi,

In the file "administrator/components/com_hikamarket/views/vendormarket/view.html.php" you can replace
Code:
public function selection($tpl = null){
By
Code:
public function selection($tpl = null){ $this->paramBase .= '.vendor_selection';
so it would use a different "key" to store the sorting value in the vendor selection and in the vendor listing.

In the same view, you can also replace
Code:
$this->processFilters($filters, $order, $searchMap);
By
Code:
$orderingAccept = array( 'a.vendor_id', 'a.vendor_name', 'a.vendor_published', 'a.vendor_email', ); $this->processFilters($filters, $order, $searchMap, $orderingAccept);
In order to specify the authorized columns for the ordering ; it will avoid the SQL error you got.

These two patchs will be tested and added into HikaMarket.

Regards,

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

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

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