/** * @return string html form for log to Twenga API. */ private function displayTwengaLogin() { global $cookie; $isoUser = strtolower(Language::getIsoById(intval($cookie->id_lang))); if ($isoUser == 'en') { $lost_link = 'https://rts.twenga.co.uk/lost_password'; } else { $lost_link = 'https://rts.twenga.' . $isoUser . '/lost_password'; } return ' <form name="form_set_hashkey" action="" method="post"> <fieldset> <legend><img src="../modules/' . $this->name . '/logo.gif" class="middle" /> ' . $this->l('Installation of Sales Tracking') . '</legend>' . (self::$obj_twenga->getHashKey() === NULL || self::$obj_twenga->getHashKey() === '' ? '<p>' . $this->l('Enter here your Twenga Ready to Sell hashkey and Login / Pass') . '</p>' : '<label>' . $this->l('Feed\'s url') . ' : </label><div class="margin-form">' . $this->feed_url . '</div><!-- .margin-form -->') . '<label>' . $this->l('HashKey') . ' <sup>*</sup> : </label> <div class="margin-form"> <input type="text" size="38" maxlength="32" name="twenga_hashkey" value="' . self::$obj_twenga->getHashKey() . '"/> </div><!-- .margin-form --> <label>' . $this->l('Login') . ' <sup>*</sup> : </label> <div class="margin-form"> <input type="text" size="38" maxlength="32" name="twenga_user_name" value="' . self::$obj_twenga->getUserName() . '"/> </div><!-- .margin-form --> <label>' . $this->l('Password') . ' <sup>*</sup> : </label> <div class="margin-form"> <input type="password" size="38" maxlength="32" name="twenga_password" value="' . self::$obj_twenga->getPassword() . '"/> </div><!-- .margin-form --> <div class="margin-form">' . $this->l('If you forgot your login, retrieve it back here') . ' <a href="' . $lost_link . '" target="_blank">' . $lost_link . '</a></div>' . '<input type="submit" value="' . $this->l('Save') . '" name="submitTwengaLogin" class="button"/> </fieldset> </form><br />'; }
/** * @return bool if user has config twenga ok */ private function _hasConfigTwenga() { if (self::$obj_twenga->getHashKey() === NULL || self::$obj_twenga->getHashKey() === '' || (self::$obj_twenga->getUserName() === NULL || self::$obj_twenga->getUserName() === '') || (self::$obj_twenga->getPassword() === NULL || self::$obj_twenga->getPassword() === '')) { return false; } else { return true; } }
/** * @return string html form for log to Twenga API. */ private function displayTwengaLogin() { global $cookie; $isoUser = strtolower(Language::getIsoById(intval($cookie->id_lang))); if ($isoUser == 'en') { $lost_link = 'https://rts.twenga.co.uk/lostpassword'; } else { $lost_link = 'https://rts.twenga.' . $isoUser . '/lostpassword'; } if ($isoUser == 'en') { $tarifs_link = 'https://rts.twenga.co.uk/ratecard'; } elseif ($isoUser == 'es') { $tarifs_link = 'https://rts.twenga.es/ratecard'; } elseif ($isoUser == 'it') { $tarifs_link = 'https://rts.twenga.it/ratecard'; } elseif ($isoUser == 'de') { $tarifs_link = 'https://rts.twenga.de/ratecard'; } else { $tarifs_link = 'https://rts.twenga.fr/ratecard'; } $output = '<form name="form_set_hashkey" action="" method="post"> <fieldset> <legend> <img src="../modules/' . $this->name . '/logo.gif" class="middle" /> '; if ((self::$obj_twenga->getHashKey() === NULL || self::$obj_twenga->getHashKey() === '') && (self::$obj_twenga->getUserName() === NULL || self::$obj_twenga->getUserName() === '') && (self::$obj_twenga->getPassword() === NULL || self::$obj_twenga->getPassword() === '')) { $output .= $this->l('B - Installation of Sales Tracking'); } else { $output .= $this->l('B - Configuration'); } $output .= '</legend>' . (self::$obj_twenga->getHashKey() === NULL || self::$obj_twenga->getHashKey() === '' ? '<p>' . $this->l('Enter here your Twenga Ready to Sell hashkey and Login / Pass') . '</p>' : '<label>' . $this->l('Feed\'s url') . ' : </label><div class="margin-form">' . $this->feed_url . '</div><!-- .margin-form -->') . '<label>' . $this->l('HashKey') . ' <sup>*</sup> : </label> <div class="margin-form"> <input type="text" size="38" maxlength="32" name="twenga_hashkey" value="' . Tools::safeOutput(self::$obj_twenga->getHashKey()) . '"/> </div><!-- .margin-form --> <label>' . $this->l('Login') . ' <sup>*</sup> : </label> <div class="margin-form"> <input type="text" size="38" maxlength="64" name="twenga_user_name" value="' . Tools::safeOutput(self::$obj_twenga->getUserName()) . '"/> </div><!-- .margin-form --> <label>' . $this->l('Password') . ' <sup>*</sup> : </label> <div class="margin-form"> <input type="password" size="38" maxlength="64" name="twenga_password" value="' . Tools::safeOutput(self::$obj_twenga->getPassword()) . '"/> </div><!-- .margin-form --> <div class="margin-form">' . $this->l('If you forgot your login, retrieve it back here') . ' <a href="' . $lost_link . '" target="_blank">' . $lost_link . '</a></div>' . '<p align=center><input type="submit" value="' . $this->l('Save') . '" name="submitTwengaLogin" class="button"/></p> <p>' . $this->l('Your catalogue will be listed in approx.72 hours. Once your products appear on Twenga, you will receive additional traffic flow of online buyers for your website.<br/> You can check the pricing grid for Twenga’s qualified traffic by clicking on the link below:') . ' </p> <p><a href="' . $tarifs_link . '" class="link" id="twenga_tarif">' . $this->l('Twenga Prices') . '</a></p> <p>' . $this->l('You will benefit from detailed traffic & sales supports tools, allowing you total control on your activity on Twenga.') . '</p> <div align=center><img src="../modules/' . $this->name . '/awards.jpg" alt="" /></div> </fieldset> </form><br />'; return $output; }