Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help To add Social Login into Login Module


yoksito

Recommended Posts

Hi, i need help to add this code:

<hr>
<?php 
// ezSocial Login contrib start
$ezsocial = file_get_contents('ezsocial/ezsocial.html'); 
echo $ezsocial;
// ezSocial Login contrib end
?>
 
To this module:
    function execute() {
      global $PHP_SELF, $customer_id, $customer_first_name, $customer_last_name, $oscTemplate;


      if (!tep_session_is_registered('customer_id')) {
        if (!in_array(basename($PHP_SELF), $this->lbfile_array())) {
          $data = '<div class="ui-widget infoBoxContainer">' .
                  '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LOGIN_BOX_TITLE . '</div>' .
                  '  <div class="ui-widget-content infoBoxContents" style="text-align: center;">' .
                  '    ' . tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true) .
                  '    ' . '<span style="float: left">' . MODULE_BOXES_LOGIN_BOX_EMAIL_ADDRESS . '</span><br />' . tep_draw_input_field('email_address', '', 'size="10" style="width: 90%"') . '<br /><span style="float: left">' . MODULE_BOXES_LOGIN_BOX_PASSWORD . '</span><br />' . tep_draw_password_field('password', '', 'size="10" style="width: 90%"') . '<br />' . tep_draw_button(IMAGE_BUTTON_LOGIN, 'key', null, 'primary') . '<br /><a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . MODULE_BOXES_LOGIN_BOX_PASSWORD_FORGOTTEN . '</a><br /><a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . MODULE_BOXES_LOGIN_BOX_NEW_ACCOUNT . '</a>' .
                  '    </form>' .
                  '  </div>' .
                  '</div>';


          $oscTemplate->addBlock($data, $this->group);
        }

The module is:
login_box_v_1_2_1

 

And im trying to add, social login after the: create new account link.
attach an image of the module in index page.

 

post-337072-0-17677200-1444958473_thumb.png

 

Already did work it, but.... into mywebpage.com/login.php, like this.

post-337072-0-26312500-1444958793_thumb.png

 

Link to comment
Share on other sites

@@yoksito

 

My guess would be something like this.

    function execute() {
      global $PHP_SELF, $customer_id, $customer_first_name, $customer_last_name, $oscTemplate;

      $ezsocial = file_get_contents('ezsocial/ezsocial.html'); 

      if (!tep_session_is_registered('customer_id')) {
        if (!in_array(basename($PHP_SELF), $this->lbfile_array())) {
          $data = '<div class="ui-widget infoBoxContainer">' .
                  '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LOGIN_BOX_TITLE . '</div>' .
                  '  <div class="ui-widget-content infoBoxContents" style="text-align: center;">' .
                  '    ' . tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true) .
                  '    ' . '<span style="float: left">' . MODULE_BOXES_LOGIN_BOX_EMAIL_ADDRESS . '</span><br />' . tep_draw_input_field('email_address', '', 'size="10" style="width: 90%"') . '<br /><span style="float: left">' . MODULE_BOXES_LOGIN_BOX_PASSWORD . '</span><br />' . tep_draw_password_field('password', '', 'size="10" style="width: 90%"') . '<br />' . tep_draw_button(IMAGE_BUTTON_LOGIN, 'key', null, 'primary') . '<br /><a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . MODULE_BOXES_LOGIN_BOX_PASSWORD_FORGOTTEN . '</a><br /><a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . MODULE_BOXES_LOGIN_BOX_NEW_ACCOUNT . '</a><br />' . $ezsocial .  
                  '    </form>' .
		  '  </div>' .
                  '</div>';


          $oscTemplate->addBlock($data, $this->group);
        }

But to be able to make sure we need to know what Addons you installed exactly, post link to addon, and what version of osCommerce you are running?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...