Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Make Api Return Custom Field In Cscart_Users Rate Topic   - - - - -

 
  • Tice
  • Newbie
  • Members
  • Join Date: 10-Dec 17
  • 14 posts

Posted 12 January 2018 - 11:32 AM #1

Hello!

 

How do I modify the Cs-Cart api to return a manually added column in the cscart_users table?

 

Cheers



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17267 posts

Posted 15 January 2018 - 05:40 AM #2

Try to use hooks in the fn_get_users function (app/functions/fn.users.php) to add new field to the result of this function


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Tice
  • Newbie
  • Members
  • Join Date: 10-Dec 17
  • 14 posts

Posted 30 January 2018 - 07:09 AM #3

What would a hook like that look like? Would adding a hook to return a new field also allow for me to sort using it?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17267 posts

Posted 30 January 2018 - 08:45 AM #4

What would a hook like that look like? Would adding a hook to return a new field also allow for me to sort using it?

 

Try to use get_users_post one


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10562 posts

Posted 30 January 2018 - 08:21 PM #5

The API should return all columns in the rows of cscart_users_table.  I don't see where it does any filtering of fields on either a GET request or a PUT request.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.