[Skip to main content](#vessel-content)

#   error on discount when selecting vendor

##

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

10 years 11 months ago [\#221996](#221996) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  *[error on discount when selecting vendor](/forum/22-market-bug-report/880703-error-on-discount-when-selecting-vendor#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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;id asc LIMIT 0, 25")* was created by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")*

-- 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 &gt; 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 &gt; 1) ORDER BY a.user_id asc LIMIT 0, 25

- [ ![2015-11-25&#95;18&#95;20&#95;38-Error&#95;&#95;1054&#95;Unknown&#95;column&#95;a&#95;user&#95;id&#95;in&#95;order&#95;clause&#95;SQLSELECT&#95;a&#95;&#95;&#95;FROM&#95;shd.png](/forum/attachment/27976) ](/forum/attachment/27976 "...&#95;&#95;FROM&#95;shd.png") [ ](/forum/attachment/27976?download=1 "...&#95;&#95;FROM&#95;shd.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg4MDcwMy1lcnJvci1vbi1kaXNjb3VudC13aGVuLXNlbGVjdGluZy12ZW5kb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#222003](#222003) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[error on discount when selecting vendor](/forum/22-market-bug-report/880703-error-on-discount-when-selecting-vendor#222003 "-- 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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;id asc LIMIT 0, 25")*

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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg4MDcwMy1lcnJvci1vbi1kaXNjb3VudC13aGVuLXNlbGVjdGluZy12ZW5kb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

10 years 11 months ago [\#222040](#222040) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[error on discount when selecting vendor](/forum/22-market-bug-report/880703-error-on-discount-when-selecting-vendor#222040 "-- 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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;id asc LIMIT 0, 25")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg4MDcwMy1lcnJvci1vbi1kaXNjb3VudC13aGVuLXNlbGVjdGluZy12ZW5kb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#222084](#222084) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[error on discount when selecting vendor](/forum/22-market-bug-report/880703-error-on-discount-when-selecting-vendor#222084 "-- 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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;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&#95;id' in 'order clause' SQL=SELECT &#42; FROM shd8y&#95;hikamarket&#95;vendor AS a WHERE (a.vendor&#95;id &gt; 1) ORDER BY a.user&#95;id asc LIMIT 0, 25")*

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-&gt;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-&gt;processFilters($filters, $order, $searchMap);

By Code:

$orderingAccept = array( 'a.vendor_id', 'a.vendor_name', 'a.vendor_published', 'a.vendor_email', ); $this-&gt;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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg4MDcwMy1lcnJvci1vbi1kaXNjb3VudC13aGVuLXNlbGVjdGluZy12ZW5kb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.059 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
