Unknown price field used: [] error

Discussion in 'Integration' started by rpbrehm, Sep 14, 2009.

  1. rpbrehm

    rpbrehm New Member

    Joined:
    Jul 13, 2009
    Messages:
    7
    I am doing a customization of signup.php to allow a user to register for a free product. The code works on localhost but when I try it out in my test environment am getting the following error: Unknown price field used: []

    It actually creates a new user but fails to send out the opt in email.

    Thanks in advance!

    Bob
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    What edits did you do to the product area?

    David
  3. rpbrehm

    rpbrehm New Member

    Joined:
    Jul 13, 2009
    Messages:
    7
    David, thanks for your quick reply. I did in fact change the product (and the paysystem) section as follows:

    <input type="hidden" id="product{$p.product_id}" name="product_id" value="3" />
    {foreach from=$paysystems item=p}
    <input type="hidden" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" />
    {/foreach}

    Notice the value="3" which is a hardcoded product id. Well on my test system the value is "5". I changed this and everything started working!

    I will fix the above code to use a non-hardcoding technique. It's too dangerous to leave it this way.

Share This Page