Answer the question
In order to leave comments, you need to log in
How to programmatically change resource group in MODX Revo?
Hello, I'm uploading products from csv to MODX Revo MINISHOP 2. I wrote a snippet that creates and updates products, but the problem is that product discounts are based on resource groups, i.e. the product is assigned a group of 5%, and the discount is accordingly calculated by 5%. And here the question arises - how to programmatically specify the resource group to which it belongs?
Displayed all the values of the resource:
$res = $modx->getObject('modResource',373);
$output = $res->toArray();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question