public static function ipPaymentUrl($data) { /** * @var \Ip\Payment[] $paymentMethods */ $paymentMethods = Model::collectPaymentMethods($data); if (empty($paymentMethods)) { return ''; } if (count($paymentMethods) == 1) { //redirect to the payment method as there is only one available $paymentUrl = $paymentMethods[0]->paymentUrl($data); return $paymentUrl; } //show payment selection window //we will store all $data to the storage and assign a unique 32 character key //then we will redirect the user to the url with generated key. //this way we will have access to $data in payment selection window //$_SESSION is not good fit in this case because it will fail if user navigates checkout process several times in different tabs //and uses back / forward buttons of the browser. $key = Model::storePaymentData($data); $paymentSelectUrl = ipRouteUrl('Ecommerce_paymentSelect', array('key' => $key)); return $paymentSelectUrl; }
*/ echo ipSlot('showComments'); ?> <div class="containerForm"> <?php echo '<div class="coFormTitle">' . __('Write a comment', 'Comments') . '</div>'; ?> <div class="commentSuccess input-group hidden"> <div id="cCloseBtn" class="commentCloseBtn"><?php echo __('Close', 'Comments'); ?> </div> <div><?php echo __('Your comment has been sent and it is awaiting moderation. Thank you.', 'Comments'); ?> </div> </div> <?php if (ipGetOption('Comments.requireLogin') == 'Yes') { if (ipUser()->loggedIn()) { echo $form->render(); } else { $curLink = ipContent()->getCurrentPage()->getLink(); $_SESSION['User_redirectAfterLogin'] = $curLink; echo '<a style="text-decoration:none" href="' . ipRouteUrl('User_login') . '" class="button warning">' . __('Please, Login for comment', 'Comments') . '</a>'; } } else { echo $form->render(); } ?> </div>
<?php /** * Created by PhpStorm. * User: Marijus * Date: 5/13/14 * Time: 3:44 PM */ namespace Plugin\Rss; $routes[ipGetOption('Rss.rssUrl') . '{/languageCode}'] = array('name' => 'Rss', 'action' => function ($languageCode = null) { if ($languageCode == null) { $languageCode = ipContent()->getCurrentLanguage()->getCode(); } $data = array('title' => ipGetOption('Rss.channelTitle'), 'url' => ipRouteUrl('Rss'), 'description' => ipGetOption('Rss.channelDescription')); $data['items'] = Model::getRssItems($languageCode); $data['language'] = Model::getRssLanguage($languageCode); $xmlResponse = new XmlResponse($data); return $xmlResponse; });