Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change Google+ & Pinterest Icons


broadstreetbully

Recommended Posts

@@broadstreetbully

 

yeah, yeah Pinterest and Google the cursed Duo! It took me a while too and this is what i got now.

You can't just add icons to a folder and grab them instead, that doesn't work. As you said they grab the icons from the pinterest and google site. In my sample codes I used FontAwesome icons and some css but i guess with a little bit of tweaking it should be possible to add any icon to it.

 

inside the sb_pinterest.php

 $params['url'] = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false);

	  $output = '<li><a href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());"><i class="fa fa-pinterest" title="' . tep_output_string_protected($this->public_title) . '" alt="' . tep_output_string_protected($this->public_title) . '" /> </i></a></li>';

      return $output;
    }

and here is my sb_google_plus_share.php

      if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION == 'Vertical-Bubble') {
        $button_height = 60;
      }
	  $output = '<li><a href="https://plus.google.com/share?url=' . urlencode(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false)) . '" target="_blank"><i class="fa fa-google-plus" style="margin:15px 0 0 8px" title="' . tep_output_string_protected($this->public_title) . '" alt="' . tep_output_string_protected($this->public_title) . '" /> </i></a></li>'; 
      return $output;
    }

hope that helps you to get an idea how to change it to your liking.

Link to comment
Share on other sites

@@broadstreetbully

 

yeah, yeah Pinterest and Google the cursed Duo! It took me a while too and this is what i got now.

You can't just add icons to a folder and grab them instead, that doesn't work. As you said they grab the icons from the pinterest and google site. In my sample codes I used FontAwesome icons and some css but i guess with a little bit of tweaking it should be possible to add any icon to it.

 

inside the sb_pinterest.php

 $params['url'] = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false);

	  $output = '<li><a href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());"><i class="fa fa-pinterest" title="' . tep_output_string_protected($this->public_title) . '" alt="' . tep_output_string_protected($this->public_title) . '" /> </i></a></li>';

      return $output;
    }

and here is my sb_google_plus_share.php

      if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION == 'Vertical-Bubble') {
        $button_height = 60;
      }
	  $output = '<li><a href="https://plus.google.com/share?url=' . urlencode(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false)) . '" target="_blank"><i class="fa fa-google-plus" style="margin:15px 0 0 8px" title="' . tep_output_string_protected($this->public_title) . '" alt="' . tep_output_string_protected($this->public_title) . '" /> </i></a></li>'; 
      return $output;
    }

hope that helps you to get an idea how to change it to your liking.

don't know why google & pinterest gotta go & mess with the program lol...I'm gonna try this, thank you. if I can't get it going I might remove that module then just add my own share buttons directly in the products_info.php page...thanks again!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...