Support Center

Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 07, 2009, 02:00:43 PM
22771 Posts in 5216 Topics by 2974 Members
Latest Member: Vijitha
News: Do not post any jReviews files or large amounts of code in the forums please. Only template files and code are allowed.
 
jReviews Support Forum  |  jReviews 1.x  |  Tips & tricks  |  Can I "Turn Off" Amazon feature, Some items not sold there « previous next »
Pages: [1]
Author Topic: Can I "Turn Off" Amazon feature, Some items not sold there  (Read 4397 times)
Mark
Newbie
*
Offline Offline

Posts: 15



WWW
« on: May 14, 2007, 06:04:45 PM »

85% of the things on my site are on Amazon, but some are not. Is there a way to make the button go away?

Thanks!
Logged

AbleGamers.com - A Site for Disabled Gamers.
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #1 on: May 14, 2007, 06:09:00 PM »

The Amazon button is not a feature, it's a simple addition to the template and you can have it disappear by enclosing the Amazon link code (see readme.txt in store template folder) between these tags:

Code:
<patTemplate:tmpl name="amazon" type="simplecondition" requiredvars="jr_asin" varscope="jreviewcontent">
Code for button here
</patTemplate:tmpl>

The assumption is that you will only enter an ASIN number for Amazon products. You can rename jr_asin for whatever fieldname you decide to use.

EDIT: fixed error in patTemplate code
« Last Edit: June 17, 2007, 11:11:48 PM by Alejandro » Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Mark
Newbie
*
Offline Offline

Posts: 15



WWW
« Reply #2 on: June 17, 2007, 10:34:06 AM »

I think you misunderstood what I am asking... I like the button there, I love it! But not all items I have in my review are sold at Amazon...

So here was my thought. I create another field (like the asin filed) called jr_soldonAmazon and make it a yes / no.

So if I place an item in to the review, if I check the box it is shown, and if not it does something else.

If blogview was a php file I would just do something like

Code:
<php
if (js_soldonAmazon - 'true)
   button code with Amazon;
else
   other buy link info;


somthing like this would allow my tp place an adhoc buy like for non amazon products...

Not sure how to do this given that blogview is an html file, and I SUCK at programing
Logged

AbleGamers.com - A Site for Disabled Gamers.
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #3 on: June 17, 2007, 11:15:48 PM »

What I suggested before does exactly what you wanted except it does not show an alternative it just hides it and it was for content pages. For the blogview you just need to replace   "jreviewcontent" with "single_item"

If you want to do an if ... else ... statement then this should work:
Code:
<patTemplate:tmpl name="shop_button" type="condition" conditionvar="jr_asin" varscope="single_item">

<patTemplate:sub condition="__empty">
Your other button
</patTemplate:sub>
<patTemplate:sub condition="__default">
Your amazon button
</patTemplate:sub>


</patTemplate:tmpl>

And again, change the single_item with jreviewcontent if you are placing this in the com_content template.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Blackartist
Sr. Member
****
Offline Offline

Posts: 152


« Reply #4 on: July 06, 2007, 06:26:08 PM »

is the procedure to do this the same for rc3?

If so can you walk a real noob through it?

Thanks
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #5 on: July 06, 2007, 09:11:33 PM »

This is for RC3, yes. What exactly do you want to do and have you read this?

http://support.reviewsforjoomla.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=6&nav=0,8
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Mark
Newbie
*
Offline Offline

Posts: 15



WWW
« Reply #6 on: November 14, 2007, 11:25:00 PM »

Hey,

So I took this and expanded it. Because I mainly review games, this is my setup.

Many games are on many platforms, so here is what I did

On my site I can now enter if it is on Amazon. if it is on Amazon then you can enter the code for each platform... So if you enter a code for a PC you get a clickable windows icon. Same with XBOX and so on.

Go check it out! Link

You will see that there is many game icons, if you do into the record you will see the amazon block.

I am working on something for non-games as well... soon!
Logged

AbleGamers.com - A Site for Disabled Gamers.
Mark
Newbie
*
Offline Offline

Posts: 15



WWW
« Reply #7 on: November 14, 2007, 11:26:03 PM »

Oh if anyone wants the code let me know,, I do not want to post something I am not allowed.
Logged

AbleGamers.com - A Site for Disabled Gamers.
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #8 on: November 15, 2007, 06:18:13 AM »

Hi Mark,

Template code and even small code hacks are more than welcome on the forum because it helps others and it gives ideas of what can be done.

Please do share them. You can open a new post in the tips&tricks board if you like.

Thanks
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Mark
Newbie
*
Offline Offline

Posts: 15



WWW
« Reply #9 on: December 01, 2007, 11:45:29 AM »

I had a long post here about what I did, but the damn timeout reset, so here is the short one of it.

ISSUE1: Not all things on my site are on Amazon
ISSUE2: Games are sold on more than one platform

Solution: Use the thing above to make it all work out

First a "Is it on amazon" (I could have used a checkbox, but I did not, and I am to lazy to go and change it)

Second, make a field for each of the game platforms to hold the Amazon number

Code

IS IT ON AMAZON (ONAMAZON NOT NULL)
     YES
          DO I HAVE A XBOX NUMBER (IS XBOX NOT NULL)
          YES
              HERE IS A LINK
         END
          DO I HAVE A WII NUMBER (IS WII NOT NULL)
          YES
              HERE IS A LINK
         END
          DO I HAVE A PS3 NUMBER (IS PS3 NOT NULL)
          YES
              HERE IS A LINK
         END
     END

Here were more games but you get the blah blah blah...

Great thing, if it is not on Amazon, you get NO "buy" box at all. It if it, you get an icon for every platform it is on, and that icon is a link to Amazon...

See images, see con_content.html
« Last Edit: December 01, 2007, 11:47:41 AM by Mark » Logged

AbleGamers.com - A Site for Disabled Gamers.
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #10 on: December 02, 2007, 08:25:48 AM »

Thanks for the great contribution. Moving it to tips&tricks.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
tartunes
Newbie
*
Offline Offline

Posts: 6



WWW
« Reply #11 on: July 26, 2008, 01:27:25 PM »

Alejandro, I am having trouble hiding the Amazon buttons when there is no ASIN number entered - i have 2 buttons for separate code/asin fields (1 for CDs and 1 for MP3s)... I am wondering if reworking this along the lines of what Mark has done in the post here would be better than what i have been trying to get to work below - seems like the below is the best/easiest approach but for the review items i have where there is no ASIN entered it is not pulling up the thumbnail images for the review item...

<patTemplate:tmpl name="com_content" type="simplecondition" requiredvars="jr_asin,jr_mpasin" varscope="jreviewcontent">
<!--  com_content.html store template -->
   <div id="jr_com_content">
      <patTemplate:link src="user_reviews_header" />
      <div id="content_images" style="float:left;">
         <patTemplate:link src="com_content_introimage" />
         <div class="image_zoom">Click to see larger images</div>
         <patTemplate:link src="com_content_images" />
      </div>
      <div class="content_fields">
         <div>
         {CUSTOMFIELDS}
         </div>
         <div class="clear"></div>
         <div class="content_affiliate">
            <a href="http://www.amazon.com/gp/product/<patTemplate:var name="jr_asin" modifier="strip_tags" modifierType="php" />?ie=UTF8&amp;tag=t0ca-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=<patTemplate:var name="jr_asin" modifier="strip_tags" modifierType="php" />">
               <img border="0" alt="buy the CD" src="{TEMPLATE}/custom_images/buy-from-tan.gif" />
            </a>
         </div>
      <div class="content_affiliate">
            <a href="http://www.amazon.com/gp/product/<patTemplate:var name="jr_mpasin" modifier="strip_tags" modifierType="php" />?ie=UTF8&amp;tag=t0ca-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=<patTemplate:var name="jr_mpasin" modifier="strip_tags" modifierType="php" />">
               <img border="0" alt="buy as MP3s" src="{TEMPLATE}/custom_images/buy-from-tan02.gif" />
            </a>
         </div>
      </div>
      <div style="clear:both;"><br /></div>
      {INTROTEXT}<div style="clear:both;"><br />{FULLTEXT}</div>
   </div>
</patTemplate:tmpl>
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #12 on: July 26, 2008, 11:06:37 PM »

This:

Code:
<patTemplate:tmpl name="com_content" type="simplecondition" requiredvars="jr_asin,jr_mpasin" varscope="jreviewcontent">

requires that both asin and mpasin have a value. Instead you should try with two blocks of code, one for each:

Code:
<patTemplate:tmpl name="com_content" type="simplecondition" requiredvars="jr_asin" varscope="jreviewcontent">

and the other one:

Code:
<patTemplate:tmpl name="com_content" type="simplecondition" requiredvars="jr_mpasin" varscope="jreviewcontent">
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
TheSaint
Newbie
*
Offline Offline

Posts: 22


« Reply #13 on: September 26, 2008, 04:42:20 AM »

I'm using the Amazon button in authorreviewdetail.html and my link code looks like this:

Code:
<a target="_blank" href="http://www.amazon.de/exec/obidos/ASIN/<patTemplate:var name="copy_of_asin" copyFrom="com_content.jr_asin" />/booklove-21">
<img border="0" alt="Jetzt kaufen" src="<patTemplate:var name="copy_of_template" copyFrom="com_content.template" />/custom_images/buy-from-tan.gif" />
</a>
 


Can I change this to include the "simplecondition" for showing the button only when an ASIN is entered?
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #14 on: September 26, 2008, 09:27:39 AM »

Sure you can try the approach here:

http://www.reviewsforjoomla.com/option,com_smf/Itemid,34/topic,1686.msg7024/#msg7024
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Pages: [1]
« previous next »
    Jump to: