public function displayTwengaIntro() { global $cookie; $isoUser = strtolower(Language::getIsoById(intval($cookie->id_lang))); $defaultIsoCountry = strtolower($this->_currentIsoCodeCountry); $errors = array(); try { $return = self::$obj_twenga->getSubscriptionLink(array('site_url' => $this->site_url, 'feed_url' => $this->feed_url, 'country' => $isoUser, 'module_version' => (string) $this->version, 'platform_version' => (string) _PS_VERSION_)); $this->inscription_url = $return['message']; } catch (TwengaFieldsException $e) { $errors[] = $e->getMessage(); } catch (TwengaException $e) { $errors[] = $e->getMessage(); } if (!empty($errors)) { $str_error = $this->l('Errors occurred with the Twenga API subscription link:'); $str_error .= '<ol>'; foreach ($errors as $error) { $str_error .= '<li><em>' . $error . '</em></li>'; } $str_error .= '</ol>'; $this->_errors[] = $str_error; } 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'; } $tarif_arr = array(950, 565); if (extension_loaded('openssl') && file_exists($tarifs_link)) { $tarif_arr = @getimagesize($tarifs_link); } $str_return = ' <script type="text/javascript"> $().ready(function() { $("#twenga_tarif").click(function(e){ e.preventDefault(); window.open("' . $tarifs_link . '", "", "width=' . $tarif_arr[0] . ', height=' . $tarif_arr[1] . ', scrollbars=no, menubar=no, status=no" ); }); }); </script> <fieldset> <legend><img src="../modules/' . $this->name . '/logo.gif" class="middle" /> ' . $this->l('A - List your website on Twenga') . '</legend> <img src="../modules/' . $this->name . '/logo.png" alt="" class="middle" style="margin: 0 20px 0 0;" /><br/> <div class="hint clear" style="display:block;"><strong> ' . $this->l('Why list your website on Twenga?') . '</strong> <p style="margin: 11px 0 0 0;"><strong>' . $this->l('Sell more: ') . '</strong>' . $this->l('Capture more buyers whatever your size or sector') . '</p> <p style="margin: 11px 0 0 0;"><strong>' . $this->l('Keep control on your budget: ') . '</strong>' . $this->l('No minimum engagement period, no entry fees & you only pay for the clicks you receive to your website. You can define a monthly budget cap in advance.') . '</p> <p style="margin: 11px 0 0 0;"><strong>' . $this->l('Manage your activity and sales: ') . '</strong>' . $this->l('Dedicated merchant interface including detailed traffic & sales supports tools') . '</p> <p><strong>' . $this->l('Keep control on your visibility: ') . '</strong>' . $this->l('Increase traffic on the categories you choose with Traffic Boost which allows you to choose the rate you want to pay') . '</p> <p style="margin: 10px 0 10px 0;">' . $this->l('Thousands of online merchants have joined us and are satisfied with their conversion rates. Don’t wait any longer!') . '</p> </div><p><strong>' . $this->l('CASE #1 - You never signed-up to the Twenga Ready to Sell programme before:') . '</strong></p> <ol>' . '<li>' . $this->l('Click on this link to register for the Twenga Ready to Sell programme'); $str_return .= '<a href="' . $this->inscription_url . '" target="_blank" class="link">»' . $this->l('List my website on Twenga') . '«</a> <li>' . $this->l('Fill out the Twenga registration form. Certain fields concerning your site and your catalogue will be automatically filled in for your convenience.') . '</li> <li>' . $this->l('When you receive the Twenga hash-key by e-mail, return to this page and paste in the "hashkey" field. Click on Save and Activate.') . '</li> </ol>'; $str_return .= '<p><strong>' . $this->l('CASE #2 - You already registered to the Twenga Ready to Sell programme:') . '</strong></p>' . '<ol>' . '<li>' . $this->l('Retrieve your Twenga hashkey from your Twenga Ready to Sell account (in the tools > tracking section > Click on ‘Display my key /hashkey’).'); $str_return .= ' <li>' . $this->l('Return to this page and paste in the "hash key" field. Click on Save.') . '</li> </li> </ol> <p align=center><a href="' . $this->inscription_url . '" target="_blank"><input type="submit" value="' . $this->l('List my website on Twenga') . '" class="button"/></a></p> </fieldset> <br />'; return $str_return; }
/** * */ public function displayTwengaIntro() { $errors = array(); try { $return = self::$obj_twenga->getSubscriptionLink(array('site_url' => $this->site_url, 'feed_url' => $this->feed_url, 'country' => self::$shop_country)); $this->inscription_url = $return['message']; } catch (TwengaFieldsException $e) { $errors[] = $e->getMessage(); } catch (TwengaException $e) { $errors[] = $e->getMessage(); } if (!empty($errors)) { $str_error = $this->l('Errors occurred with the Twenga API subscription link:'); $str_error .= '<ol>'; foreach ($errors as $error) { $str_error .= '<li><em>' . $error . '</em></li>'; } $str_error .= '</ol>'; $this->_errors[] = $str_error; } $defaultIsoCountry = strtolower($this->_currentIsoCodeCountry); if ($defaultIsoCountry == 'gb') { $tarifs_link = 'https://rts.twenga.com/media/prices_uk.jpg'; } else { $tarifs_link = 'https://rts.twenga.com/media/prices_' . $defaultIsoCountry . '.jpg'; } global $cookie; $isoUser = strtolower(Language::getIsoById(intval($cookie->id_lang))); $tarif_arr = array(950, 565); if (file_exists($tarifs_link)) { $tarif_arr = @getimagesize($tarifs_link); } $str_return = ' <script type="text/javascript"> $().ready(function() { $("#twenga_tarif").click(function(e){ e.preventDefault(); window.open("' . $tarifs_link . '", "", "width=' . $tarif_arr[0] . ', height=' . $tarif_arr[1] . ', scrollbars=no, menubar=no, status=no" ); }); }); </script> <fieldset> <legend><img src="../modules/' . $this->name . '/logo.gif" class="middle" /> ' . $this->l('Get your products listed on Twenga.co.uk and follow the sales generated by Twenga') . '</legend>' . '<div style="float:left; width:80px; height:100px"> <img src="../modules/' . $this->name . '/logo_big.jpg" alt="" class="middle" style="margin: 20px 0 0 0;" /> </div>' . '<p><strong>' . $this->l('You have already signed up to Twenga Ready to Sell ?') . '</strong></p>' . '<ul>' . '<li>' . $this->l('Step 1: Retrieve your Twenga hashkey from your Twenga Ready to Sell account (tools>tracking>hashkey). Also click on "Test the tracking".'); $str_return .= ' <li>' . $this->l('Step 2: Come back here and paste it in the "hash key" field. Click on Save and Activate.') . '</li> </ul> <p><strong>' . $this->l('You want to sign up to Twenga Ready to Sell ?') . '</strong></p> <p>' . $this->l('How to list your product on Twenga.co.uk:') . '</p> <ul>' . '<li>' . $this->l('Step 1: Click on this link to sign up to Twenga Ready to Sell '); if ($this->inscription_url !== NULL) { $str_return .= ' <a href="' . $this->inscription_url . '" target="_blank" class="link">»' . $this->l('Subscribe') . '«</a>' . '</li>'; } else { $str_return .= ' <em style="color:red;">' . $this->l('Error(s) occurred: please contact Twenga') . '</em>'; } $str_return .= ' <li>' . $this->l('Step 2: Fill in the Twenga sign up form') . '</li> <li>' . $this->l('Step 3: When you receive the Twenga hash-key by e-mail, come back here and paste it in the "hash key" field. Click on Save and Activate.') . '</li> </ul>'; if ($isoUser == 'fr') { $str_return .= '<p style="text-align:center;"><a href="#" title="' . $this->l('Increase your traffic - 500 offered clicks') . '" onclick="$(\'#submitTwengaSubscription\').click(); return false;" ><img src="' . self::$base_path . '/bt_500_clicks.gif" width="364" height="45" /></a></p>'; } $str_return .= ' <p>' . $this->l('Get your products listed on Twenga for free : only pay when you sell !') . '</p> <p><a href="' . $tarifs_link . '" class="link" id="twenga_tarif">' . $this->l('Twenga Prices') . '</a></p> </fieldset> <br />'; return $str_return; }
public function displayTwengaIntro() { global $cookie; $isoUser = strtolower(Language::getIsoById(intval($cookie->id_lang))); $defaultIsoCountry = strtolower($this->_currentIsoCodeCountry); $errors = array(); try { $return = self::$obj_twenga->getSubscriptionLink(array('site_url' => $this->site_url, 'feed_url' => $this->feed_url, 'country' => $isoUser, 'module_version' => (string) $this->version, 'platform_version' => (string) _PS_VERSION_)); $this->inscription_url = $return['message']; } catch (TwengaFieldsException $e) { $errors[] = $e->getMessage(); } catch (TwengaException $e) { $errors[] = $e->getMessage(); } if (!empty($errors)) { $str_error = $this->l('Errors occurred with the Twenga API subscription link:'); $str_error .= '<ol>'; foreach ($errors as $error) { $str_error .= '<li><em>' . $error . '</em></li>'; } $str_error .= '</ol>'; $this->_errors[] = $str_error; } if ($isoUser == 'gb' || $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'; } $tarif_arr = array(950, 565); if (extension_loaded('openssl') && file_exists($tarifs_link)) { $tarif_arr = @getimagesize($tarifs_link); } $str_return = ' <script type="text/javascript"> $().ready(function() { $("#twenga_tarif").click(function(e){ e.preventDefault(); window.open("' . $tarifs_link . '", "", "width=' . $tarif_arr[0] . ', height=' . $tarif_arr[1] . ', scrollbars=no, menubar=no, status=no" ); }); $(".moduleTwenga-referencement ol").hide(); $(".display").click(function(){ $(this).next(".moduleTwenga-referencement ol").slideToggle(); $(this).prev(".moduleTwenga-referencement img").toggleClass("rotate"); return false; }); }); </script> <link type="text/css" rel="stylesheet" href="../modules/' . $this->name . '/css/module-twenga.css" /> <div class="module-twenga"> <div class="moduleTwenga-intro" style="background-image:url(../modules/' . $this->name . '/img/cible-twenga.png);")> <p><img src="../modules/' . $this->name . '/img/logo-twenga.png" width="200" height="43" alt="Twenga" /></p> <p class="module-title">' . $this->l('List your products and increase your sales.') . '</p> <dl> <dt>' . $this->l('Manage your budget:') . '</dt> <dd>' . $this->l('You pay for the traffic that Twenga sends you using CPC. Joining Twenga and setting up your account is free of charge.') . '<br /> ' . $this->l('If needs be, you can set up a monthly budget limit.') . '</dd> <dt>' . $this->l('Manage your activity and sales:') . '</dt> <dd>' . $this->l('Dedicated merchant interface including detailed traffic & sales support tools.') . '</dd> <dt>' . $this->l('Manage your visibility:') . '</dt> <dd>' . $this->l('Boost product visibility whenever you like!') . '</dd> </dl> <p class="module-title">' . $this->l('More than 15,000 merchants have already joined Twenga Ready to Sell.') . '</p> </div> '; return $str_return; }