【问题标题】:Changing WordPress form redirect URL based on options chosen?根据选择的选项更改 WordPress 表单重定向 URL?
【发布时间】:2014-03-20 06:16:16
【问题描述】:

我正在创建一个简单的 WordPress 网站,类似于这个:http://viewsyoutubes.com/

我需要插入一个表单,完成后会将访问者发送到 PayPal 支付页面(因此当提交表单时,它会将访问者重定向到支付页面 URL)。

However, I don't know how to make it so that depending on the option they have chosen, it sends them to a different payment page (there are different prices for different products - so when a product is selected, it needs将访问者重定向到相应的支付页面)。它需要是这样的: http://viewsyoutubes.com/buy-youtube-views/

选择不同的包裹时,它会将其发送到不同的付款页面。

这是目前的网站,您可以看到下拉列表中有 20 个选项,我需要根据所选项目更改提交 URL。 谢谢。

medialads.tk/youtube-views-likes/

【问题讨论】:

    标签: wordpress forms url redirect paypal


    【解决方案1】:

    你的意思是这样的?

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" >
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="business" value="Your@email.com">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="Shopping Cart">
    <input type="hidden" name="button_subtype" value="products">
    <input type="hidden" name="no_note" value="0">
    <input type="hidden" name="no_shipping" value="0">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="add" value="1">
    <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">
    <input type="hidden" name="on0" value="Sizes"><select name="os0">
        <option value="Small">Small $5.00 USD</option>
        <option value="Med">Med $7.00 USD</option>
        <option value="Larg">Larg $10.00 USD</option>
        <option value="Super Size">Super Size $15.00 USD</option>
    </select> 
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="option_select0" value="Small">
    <input type="hidden" name="option_amount0" value="5.00">
    <input type="hidden" name="option_select1" value="Med">
    <input type="hidden" name="option_amount1" value="7.00">
    <input type="hidden" name="option_select2" value="Larg">
    <input type="hidden" name="option_amount2" value="10.00">
    <input type="hidden" name="option_select3" value="Super Size">
    <input type="hidden" name="option_amount3" value="15.00">
    <input type="hidden" name="option_index" value="0">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.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>
    

    【讨论】:

      猜你喜欢
      • 2020-11-15
      • 1970-01-01
      • 2012-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-16
      • 1970-01-01
      相关资源
      最近更新 更多