Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
mam taki oto kod na stronie [s]ktury[/s] który chcialbym jakos zautomatyzowac:
<div id="banner"> <h1 class="" style='padding: 1em;'>Galway Series (Limited Prints), for shopping go to bottom:</h1> <div class="galleryItem"> <a target="_blank" class="hasTooltip"><span><?php include('includes/pay.php'); ?> </span><img src="web-jpg/galway/Druid Lane.jpg" alt="Druid Lane"></a> <h3>201. Druid Lane.</h3> <p>Galway.</p> </div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="costam@gmail.com"> <input type="hidden" name="lc" value="IE"> <?php echo $img201 ?> <input type="hidden" name="button_subtype" value="services"> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="shipping" value="7.00"> <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_SM.gif:NonHosted"> <table> <tr><td><input type="hidden" name="on0" value="SIzes">SIzes</td></tr><tr><td><select name="os0"> <option value="A1">A1 €150.00 EUR</option> <option value="A3">A3 €60.00 EUR</option> <option value="A4">A4 €38.00 EUR</option> <option value="A5">A5 €28.00 EUR</option> </select> </td></tr> </table><br> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="option_select0" value="A1"> <input type="hidden" name="option_amount0" value="150.00"> <input type="hidden" name="option_select1" value="A3"> <input type="hidden" name="option_amount1" value="60.00"> <input type="hidden" name="option_select2" value="A4"> <input type="hidden" name="option_amount2" value="38.00"> <input type="hidden" name="option_select3" value="A5"> <input type="hidden" name="option_amount3" value="28.00"> <input type="hidden" name="option_index" value="0"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>
<?php $heading='O`Dea Irish Art'; $A1='150'; $A3='60'; $A4='38'; $A5='28'; $priceA1='<input type="hidden" name="amount" value="' .$A1. '">'; $priceA3='<input type="hidden" name="amount" value="' .$A3. '">'; $priceA4='<input type="hidden" name="amount" value="' .$A4. '">'; $priceA5='<input type="hidden" name="amount" value="' .$A5. '">'; $img201='<input type="hidden" name="item_name" value="Druid Lane. Galway"><input type="hidden" name="item_number" value="#201">'; ?>
mam nadzieje ze wszystko bedzie jasne chodzi o to ze na stronie jest ze 40 obrazkow kazdy inny, w ofercie zakupu sa 4 opcje, jak zrobic aby w zaleznosci od obrazka dodac do paypala jego tytul i nomer tzn:
w kodzie mam <h3>201. Druid Lane.</h3> i chce aby to jakos automagicznie znalazlo sie tu <input type="hidden" name="item_name" value="Druid Lane. Galway">
od myslenia jak to zrobic dostaje juz zawrotow glowy ;-).
Ostatnio edytowany przez pink (2014-05-05 23:47:56)
Offline
Pink - wiem, że jesteś leń, sam się przyznałeś, ale nie przeginaj ;)
[url=https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/buynow_buttons/]pomoc paypala[/url] jest bardzo ładnie opisana,
Tworzysz sobie X przycisków "buy now" do każdego ustawiasz inny tytuł i na stronie pod produktami dodajesz przycisk o odpowiedniej nazwie ;p
W manualu masz też ładnie opisane [url=https://developer.paypal.com/webapps/developer/docs/classic/use-cases/uc_webcheckout-digital-goods/]"Selling Digital Goods on a Website"[/url] wraz z czymś takim co się nazywa [url=https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/gs_AdaptivePayments/]"Adaptive Payments"[/url]
Ponadto jeśli stronkę masz na WP (coś kiedyś o tym wspominałeś) to są odpowiednie [url=http://wordpress.org/plugins/tags/paypal-integration]pluginy[/url]
Offline
nie nie przeginam chdzi o to aby stworzyc taki system aby nie powtarzac kodu dla kazdego linku
i chyba mam rozwiazanie ;-)
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="costam@gmail.com"> <input type="hidden" name="lc" value="IE"> <input type="hidden" name="item_name" value="Print"> <input type="hidden" name="button_subtype" value="services"> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="shipping" value="7.00"> <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_SM.gif:NonHosted"> <table> <tr><td><input type="hidden" name="on0" value="Size">Size</td></tr><tr><td><select name="os0"> <option value="A1">A1 €150.00 EUR</option> <option value="A3">A3 €60.00 EUR</option> <option value="A4">A4 €38.00 EUR</option> <option value="A5">A5 €28.00 EUR</option> </select> </td></tr> <tr> <td> <input type="hidden" name="on1" value="name">Title</td> <tr> <td> <input type="text" name="os1" maxlength="100"></td></tr> </tr> </table><br> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="option_select0" value="A1"> <input type="hidden" name="option_amount0" value="150.00"> <input type="hidden" name="option_select1" value="A3"> <input type="hidden" name="option_amount1" value="60.00"> <input type="hidden" name="option_select2" value="A4"> <input type="hidden" name="option_amount2" value="38.00"> <input type="hidden" name="option_select3" value="A5"> <input type="hidden" name="option_amount3" value="28.00"> <input type="hidden" name="option_index" value="0"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>
teraz tylko dodam php variable dla kazdego obrazka i bedzie jak ta lala
dzieki lenistwu powstalo wiele ciekawych rozwiazan BTW;-)
ale dzieki za link do adaptive payments.
Ostatnio edytowany przez pink (2014-05-05 23:49:13)
Offline
Time (s) | Query |
---|---|
0.00011 | SET CHARSET latin2 |
0.00006 | SET NAMES latin2 |
0.00203 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.117.94.77' WHERE u.id=1 |
0.00152 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.117.94.77', 1733052844) |
0.00072 | SELECT * FROM punbb_online WHERE logged<1733052544 |
0.00139 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=25754 AND t.moved_to IS NULL |
0.00014 | SELECT search_for, replace_with FROM punbb_censoring |
0.00262 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=25754 ORDER BY p.id LIMIT 0,25 |
0.00123 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=25754 |
Total query time: 0.00982 s |