Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

add an ADDTHIS social bookmark link to your products Rate Topic   - - - - -

 
  • crashy
  • Member
  • Members
  • Join Date: 04-Feb 10
  • 71 posts

Posted 30 January 2012 - 10:31 PM #21

If you want it in the detail page, I think this code should be inside the tag "product-info" on the "default_template.tpl" file located at "skins/your-skin/customers/blocks/product_templates" folder. Try to place right before closing the tag


like this?

<div class="product-main-info">
{hook name="products:view_main_info"}

{if $product}
{assign var="obj_id" value=$product.product_id}
{include file="common_templates/product_data.tpl" product=$product}
{assign var="form_open" value="form_open_`$obj_id`"}
{$smarty.capture.$form_open}
<div class="clear">
{if !$no_images}
<div class="image-border float-left center cm-reload-{$product.product_id}" id="product_images_{$product.product_id}_update">
{include file="views/products/components/product_images.tpl" product=$product show_detailed_link="Y"}
<!--product_images_{$product.product_id}_update--></div>
{/if}

<div class="product-info">
<h1 class="mainbox-title">{$product.product|unescape}</h1>
{assign var="rating" value="rating_`$obj_id`"}{$smarty.capture.$rating}
{assign var="sku" value="sku_$obj_id"}{$smarty.capture.$sku}
<hr class="dashed clear-both" />

{assign var="old_price" value="old_price_`$obj_id`"}
{assign var="price" value="price_`$obj_id`"}
{assign var="clean_price" value="clean_price_`$obj_id`"}
{assign var="list_discount" value="list_discount_`$obj_id`"}
{assign var="discount_label" value="discount_label_`$obj_id`"}
<div class="{if $smarty.capture.$old_price|trim || $smarty.capture.$clean_price|trim || $smarty.capture.$list_discount|trim}prices-container {/if}clear">
{if $smarty.capture.$old_price|trim || $smarty.capture.$clean_price|trim || $smarty.capture.$list_discount|trim}
<div class="float-left product-prices">
{if $smarty.capture.$old_price|trim}{$smarty.capture.$old_price}&nbsp;{/if}
{/if}

{if !$smarty.capture.$old_price|trim || $details_page}<p>{/if}
{$smarty.capture.$price}
{if !$smarty.capture.$old_price|trim || $details_page}</p>{/if}

{if $smarty.capture.$old_price|trim || $smarty.capture.$clean_price|trim || $smarty.capture.$list_discount|trim}
{$smarty.capture.$clean_price}
{$smarty.capture.$list_discount}
</div>
{/if}
{if $show_discount_label && $smarty.capture.$discount_label|trim}
<div class="float-left">
{$smarty.capture.$discount_label}
</div>
{/if}
</div>

{if $capture_options_vs_qty}{capture name="product_options"}{/if}

{assign var="product_amount" value="product_amount_`$obj_id`"}
{$smarty.capture.$product_amount}

{assign var="product_options" value="product_options_`$obj_id`"}
{$smarty.capture.$product_options}

{assign var="qty" value="qty_`$obj_id`"}
{$smarty.capture.$qty}

{assign var="advanced_options" value="advanced_options_`$obj_id`"}
{$smarty.capture.$advanced_options}
{if $capture_options_vs_qty}{/capture}{/if}

{assign var="min_qty" value="min_qty_`$obj_id`"}
{$smarty.capture.$min_qty}

{assign var="product_edp" value="product_edp_`$obj_id`"}
{$smarty.capture.$product_edp}

{if $capture_buttons}{capture name="buttons"}{/if}
<div class="buttons-container nowrap">
{assign var="add_to_cart" value="add_to_cart_`$obj_id`"}
{$smarty.capture.$add_to_cart}

{assign var="list_buttons" value="list_buttons_`$obj_id`"}
{$smarty.capture.$list_buttons}
</div>
{if $capture_buttons}{/capture}{/if}
</div>
<!--add_to_cart_update_{$obj_prefix}{$obj_id}-->

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style " style="padding-top: 10px" >
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.co...81eb"></script>
<!-- AddThis Button END -->

</div>
</div>
{assign var="form_close" value="form_close_`$obj_id`"}
{$smarty.capture.$form_close}
{/if}

{/hook}

 
  • colortone
  • Senior Member
  • Members
  • Join Date: 31-Jan 10
  • 368 posts

Posted 31 January 2012 - 12:33 AM #22

yes, the idea is th have it in the product-main-info area.

 
  • crashy
  • Member
  • Members
  • Join Date: 04-Feb 10
  • 71 posts

Posted 31 January 2012 - 01:06 AM #23

I found the block method much easier...

 

Posted 22 February 2012 - 07:28 PM #24

Hi I was reading this thread and a different one and when I enter the code under the design block products it tells me this:


Content: html block

Wrapper: blocks/wrappers/mainbox_simple.tpl

Please switch to products details page to add block content.
Assigned to 0 objects


Can anyone direct me in what i am missing or doing incorrectly? Thank you




 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2348 posts

Posted 23 February 2012 - 09:10 AM #25

Hi I was reading this thread and a different one and when I enter the code under the design block products it tells me this:


Content: html block
Wrapper: blocks/wrappers/mainbox_simple.tpl
Please switch to products details page to add block content.
Assigned to 0 objects

Can anyone direct me in what i am missing or doing incorrectly? Thank you




You have to assign the block to all your products :)

When life hands you lemons, bring on the Tequila baby!


 
  • x-origin
  • Junior Member
  • Trial users
  • Join Date: 19-Nov 09
  • 4 posts

Posted 30 July 2013 - 09:29 AM #26

Hi,
I've followed the instructions on how to add "addthis" snipet, everything works except when I click on share with facebook it does not display the product image, instead it displays a side banner image from the right column!!
Could you suggest a fix?
You can take a look at it here.
http://alturl.com/woogj

Thanks

I have the same problem! any solution for this problem?