error on discount when selecting vendor

  • Posts: 377
  • Thank you received: 7
8 years 11 months ago #221996

-- 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

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #222003

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.

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: 377
  • Thank you received: 7
8 years 11 months ago #222040

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #222084

Hi,

In the file "administrator/components/com_hikamarket/views/vendormarket/view.html.php" you can replace

	public function selection($tpl = null){
By
	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
$this->processFilters($filters, $order, $searchMap);
By
$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.

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.

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