Jump to content

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

Get Categories Products Rate Topic   - - - - -

 
  • masoud_tesna
  • Advanced Member
  • Trial users
  • Join Date: 27-Jun 19
  • 55 posts

Posted 25 January 2020 - 08:01 AM #1

Dear friends,
I have a question regarding getting products from multiple categories at once.
For example, I am able to get the products in category id 521, through the following code:
 
$params['cid]=521;
fn_get_products($params);
What can I do in case i want to get products from category IDs 521، 522، 523، 524، 525, etc...  the code below won't work:
$params['cid]=521، 522، 523، 524، 525;
fn_get_products($params);

Thank you for your help!

 



 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1014 posts

Posted 25 January 2020 - 02:14 PM #2

Hello

 

Please try 

$params['cid] = array(521، 522، 523، 524، 525);

 

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • masoud_tesna
  • Advanced Member
  • Trial users
  • Join Date: 27-Jun 19
  • 55 posts

Posted 26 January 2020 - 12:06 PM #3

Hello

 

Please try 

$params['cid] = array(521، 522، 523، 524، 525);

 

 

Best regards

Robert

hi my friend thanks, this code not worked!

$params['cid'] = array(521، 522، 523، 524، 525);

 



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

Posted 27 January 2020 - 05:59 AM #4

Use

$params['cid'] = array(
    521,
    522,
    523,
    524,
    525
);

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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1014 posts

Posted 27 January 2020 - 10:02 AM #5

Hello

 

If you change it to hook, don't forget to give & before the $params function parameter.

&$params

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • masoud_tesna
  • Advanced Member
  • Trial users
  • Join Date: 27-Jun 19
  • 55 posts

Posted 28 January 2020 - 06:52 AM #6

 

Use

$params['cid'] = array(
    521,
    522,
    523,
    524,
    525
);

Thank you so much for the help, I got the answer. Thank you :wub:

 


Hello

 

If you change it to hook, don't forget to give & before the $params function parameter.

&$params

Best regards

Robert

Thank you my friend



 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1014 posts

Posted 28 January 2020 - 06:55 AM #7

Hello

 

You are welcome :)

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible