M
M
mr_firuzinho2017-06-07 18:34:11
CMS
mr_firuzinho, 2017-06-07 18:34:11

Is it possible to remove the need for authorization to add reviews to bitrix?

Is it possible to remove the need for authorization to add reviews to bitrix?
On the site, the form is shown only if the user is registered. I found a code that LIKE puts a condition that the user must be authorized. Removed, but did not help, shows the error "Authorization error"
Here is the code:

<?if($USER->IsAuthorized()):?>
                <?if($arParams["SHOW_REVIEW_FORM"]):?>
                  <div id="newReview">
                      <span class="heading"><?=GetMessage("ADDAREVIEW")?></span>
                      <form action="" method="GET">
                          <div id="newRating"><ins><?=GetMessage("YOURRATING")?></ins><span class="rating"><i class="m" style="width:0%"></i><i class="h"></i></span></div>
                          <table>
                              <tbody>
                                  <tr>
                                      <td class="left">
                                            <label><?=GetMessage("EXPERIENCE")?></label>
                                          <?if(!empty($arResult["NEW_REVIEW"]["EXPERIENCE"])):?>
                                              <ul class="usedSelect">
                                                  <?foreach ($arResult["NEW_REVIEW"]["EXPERIENCE"] as $arExp):?>
                                                      <li><a href="#" data-id="<?=$arExp["ID"]?>"><?=$arExp["VALUE"]?></a></li>
                                                  <?endforeach;?>
                                              </ul>
                                          <?endif;?>
                                          <label><?=GetMessage("DIGNIFIED")?></label>
                                          <textarea rows="10" cols="45" name="DIGNITY"></textarea>
                                      </td>
                                      <td class="right">
                                          <label><?=GetMessage("FAULTY")?></label>
                                          <textarea rows="10" cols="45" name="SHORTCOMINGS"></textarea> 
                                          <label><?=GetMessage("IMPRESSION")?></label>
                                          <textarea rows="10" cols="45" name="COMMENT"></textarea>   
                                          <label><?=GetMessage("INTRODUCEYOURSELF")?></label>
                                          <input type="text" name="NAME"><a href="#" class="submit" data-id="<?=$arParams["REVIEW_IBLOCK_ID"]?>"><?=GetMessage("SENDFEEDBACK")?></a>
                                      </td>
                                  </tr>
                              </tbody>
                          </table>
                          <input type="hidden" name="USED" id="usedInput" value="" />
                          <input type="hidden" name="RATING" id="ratingInput" value="0"/>
                          <input type="hidden" name="PRODUCT_NAME" value="<?=$arResult["NAME"]?>"/>
                          <input type="hidden" name="PRODUCT_ID" value="<?=$arResult["ID"]?>"/>
                      </form>
                  </div>
              <?endif;?>
            <?endif;?>

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