| Re: Felix, theCat!!! Re: paypal button How? |
| by joeiscoffee on 2004/11/22 14:04:33 Works like a champ! Thanks JMorris. And you too theCat. |
| Re: Felix, theCat!!! Re: paypal button How? |
| by JMorris on 2004/11/21 7:05:37 Sorry about that. I forgot to mention that you have to define email. Open adsitem.php with a text/php editor and look for the following line: le="color: #000000"><?php $annonce['codpost'] = $ads->getVar('codpost'); Directly bellow that line add the following line: le="color: #000000"><?php $annonce['email'] = $ads->getVar('email'); Save and re-upload. That will define the poster's email address in the PayPal form. RE: Templates... System Admin > Preferences > General Settings > Set "Update module template .html files from themes/your theme/templates directory?" to "Yes" before changing templates. After you change your templates, clear the contents of the templates_c folder on the web server. Then, just set "Update module template .html files from themes/your theme/templates directory?" to "No". Sorry, my instructions are not that great. Hope this helps. |
| Re: Felix, theCat!!! Re: paypal button How? |
| by joeiscoffee on 2004/11/21 4:01:00 JMorris, I am not getting the user's email to pass to paypal. The variable is empty. It looks like this in the html source. le="color: #000000"><?php <input type="hidden" name="business" value="" /> Did I do something wrong with the template cloning? I did not see this option mentioned in your instructions when doing the template. Quote: Set "Update module template..." to No Great progress you have made on this module. |
| Re: Felix, theCat!!! Re: paypal button How? |
| by joeiscoffee on 2004/11/21 2:12:27 JMoris, This looks great! I just got in and will probably install this tomorrow. Thanks again, I'll keep you updated as to my progress. |
| Re: Felix, theCat!!! Re: paypal button How? |
| by JMorris on 2004/11/21 2:06:09 OK, I believe this will do the trick. The following assumes you know how to work with templates. If you don't know how to work with templates, go to http://www.macambridge.com/dummies/ and read up on it. Create a cloned template set, set it as default, and set "Update module template..." to yes. Click on List next to Small ads in the template manager Click edit for catads_item.html Copy and paste the following code into the edit box: le="color: #000000"><?php <!-- Pas d'annonce --> <{if not $ad_exists and not $preview}> <{$smarty.const._MD_CATADS_NO_ADS}> <{else}> <table cellspacing="1" class="outer" style="width:100%;"> <tr> <th><b> <{if $annonce.date_pub == 0}> <{$smarty.const._MD_CATADS_ADSWAIT}> <{elseif $annonce.date_exp == 0}> <{$smarty.const._MD_CATADS_ADSEXP}> <{else}> <{$annonce.date_pub}> <{/if}> </b> </th> <th> <{$annonce.codpost}> <b><{$annonce.town}></b> </th> </tr> <tr> <td width="22%" class="head"> <{if $annonce.date_exp > 0 and $annonce.date_pub > 0}> <{$smarty.const._MD_CATADS_DATE_EXP}><{$annonce.date_exp}> <{/if}> </td> <td width="78%" class="head"> <{$annonce.type}><b>: </b><{$annonce.title}> </td> </tr> <tr> <td class="odd"> (<{$annonce.nbview}>) </td> <td class="odd"> <{if $annonce.price}> <b><{$smarty.const._MD_CATADS_PRICE2}> <{$annonce.price}></b> <{$annonce.monnaie}> <{if $annonce.price_option}> (<{$annonce.price_option}>) <{/if}> <{/if}> </td> </tr> <tr> <td width="22%" class="odd"> <{if $annonce.suspend > 0}> <br><{$smarty.const._MD_CATADS_PUB_SUSP}> <{else}> <b><{$smarty.const._MD_CATADS_CONTACT}></b><br><br> <{$annonce.maillink}> </br> <{$annonce.pmlink}> </br></br> <b><{$smarty.const._MD_CATADS_PHONE}> </b><br> <{$annonce.phone}> <br> <b> </b> <br> <{/if}> <div align="center"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" /> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="business" value="<{$annonce.email}>" /> <input type="hidden" name="item_name" value="<{$annonce.title}>" /> <input type="hidden" name="amount" value="<{$annonce.price}>" /> <input type="hidden" name="no_note" value="1" /> <input type="hidden" name="currency_code" value="USD" /> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /> </form> </div> </td> <td class="odd"><div align="left"> <{$annonce.description}> <br> <br> <{$annonce.photo}> <br> <br> </div></td> </tr> <{if not $preview}> <tr> <td align="left" class="foot"> <a href="print.php?op=showone&ads_id=<{$annonce.id}>"><img src="images/print.gif" border=0 alt="<{$smarty.const._MD_CATADS_PRINT}>"></a> <!-- Icone validation annonce en attente --> <{if $xoops_isadmin and $annonce.date_pub == 0}> <a href="admin/index.php?op=approve&ads_id=<{$annonce.id}>"><img src="images/valid.gif" border=0 alt="<{$smarty.const._MD_CATADS_VALIDADS}>"></a> <{/if}> <!-- Icones édition/effacement annonce --> <{if $xoops_isadmin}> <a href="admin/index.php?op=edit&ads_id=<{$annonce.id}>"><img src="images/modif.gif" border=0 alt="<{$smarty.const._MD_CATADS_EDITADS}>"></a> <a href="admin/index.php?op=delete&ads_id=<{$annonce.id}>"><img src="images/delete.gif" border=0 alt="<{$smarty.const._MD_CATADS_DELETEADS}>"></a> <a href="adsuserlist.php?uid=<{$annonce.uid}>"><img src="images/who.gif" border=0 alt="<{$smarty.const._MD_CATADS_ALLADS}><{$annonce.submitter}>"></a> <img src="images/ip.gif" border=0 alt="<{$annonce.poster_ip}>"></a> <{/if}> </td> <td align="right" class="foot"><div align="left"> <{if $annonce.isauthor}> <{if $annonce.date_exp == 0 and $annonce.countpub > 0 and $annonce.date_pub > 0}> <a href="adsitem.php?op=pubagain&ads_id=<{$annonce.id}>"><{$smarty.const._MD_CATADS_PUB_AGAIN}></a> <{elseif $annonce.date_pub > 0 and $annonce.date_exp > 0}> <{if $annonce.suspend > 0}> <a href="adsitem.php?op=stopandgo&ads_id=<{$annonce.id}>"><{$smarty.const._MD_CATADS_PUB_GO}></a> <{else}> <a href="adsitem.php?op=stopandgo&ads_id=<{$annonce.id}>"><{$smarty.const._MD_CATADS_PUB_STOP}></a> <{/if}> <{/if}> <{/if}> </div></td> </tr> <{/if}> <{/if}> </table> <br> <!-- Liens accueil/catégorie --> <{if not $preview}> <div align="center"><b>[ <{$link_main}> | <{$link_cat}> ]</b></div> <div style="text-align: center; padding: 3px; margin:3px;"> <{$commentsnav}> <{$lang_notice}> </div> <div style="margin:3px; padding: 3px;"> <!-- start comments loop --> <{if $comment_mode == "flat"}> <{include file="db:system_comments_flat.html"}> <{elseif $comment_mode == "thread"}> <{include file="db:system_comments_thread.html"}> <{elseif $comment_mode == "nest"}> <{include file="db:system_comments_nest.html"}> <{/if}> <{/if}> Click submit Test Set "Update module template..." to No Sorry to give such a rushed tutorial. The button works quite nicely, albeit with the few limitations I mentioned in my last post. I hope this meets your needs. Best Regards, JMorris |