V
V
Vladimir2019-06-16 06:55:44
MODX
Vladimir, 2019-06-16 06:55:44

Why is my code in the msGetOrder snippet being executed multiple times (3 times)?

Good morning, Modx experts, I have a question of this nature, I am finalizing the ordering functionality, namely integration with Frontpad.
I add my code to the msGetOrder snippet, which is executed after clicking the checkout button, but my code is executed several times (3 times), as a result of which 3 identical orders come to Frontpad at once.

if (!empty($toPlaceholder)) {
    $modx->setPlaceholder($toPlaceholder, $output);
} 
else {
    
  // Код находится в данном месте 		
      
    return $output;
}

I can not figure out why this is happening, tell me what is the reason.
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question