Automated product feed

Discussion in 'Customization & add-ons' started by flixxx, May 25, 2008.

  1. flixxx

    flixxx New Member

    Joined:
    May 18, 2008
    Messages:
    7
    I'm trying to build an automated product feed. I use this mysql query to add new products to the table amember_products

    $query = "INSERT INTO amember_products (title,description,price,data) VALUES ('$wordinput', 'Payment options for $wordinput', '1.00', 'a:25:{s:11:\"expire_days\";s:2:\"1m\";s:12:\"trial1_price\";s:0:\"\";s:11:\"trial1_days\";s:0:\"\";s:12:\"trial2_price\";s:0:\"\";s:11:\"trial2_days\";s:0:\"\";s:12:\"is_recurring\";s:1:\"1\";s:10:\"start_date\";s:0:\"\";s:12:\"rebill_times\";s:0:\"\";s:15:\"paypal_currency\";s:3:\"EUR\";s:4:\"##11\";N;s:3:\"url\";s:29:\"http://website.com/$wordinput\";s:8:\"add_urls\";s:0:\"\";s:4:\"##12\";N;s:5:\"scope\";s:0:\"\";s:5:\"order\";s:0:\"\";s:11:\"price_group\";s:0:\"\";s:13:\"renewal_group\";s:0:\"\";s:14:\"need_agreement\";s:0:\"\";s:13:\"require_other\";a:1:{i:0;s:8:\"ACTIVE-2\";}s:16:\"prevent_if_other\";N;s:4:\"##13\";N;s:19:\"autoresponder_renew\";s:0:\"\";s:16:\"dont_mail_expire\";s:0:\"\";s:14:\"aff_commission\";s:0:\"\";s:18:\"aff_commission_rec\";s:0:\"\";}')";

    The query works because there are new products added to the list. When I check the settings of the new products via my admin page there are only default settings set for the products, although I entered specific options in the sql query. For example the currence EUR is replaced by USD. Very strange ! Somebody knows how I can solve this ? I checked my database but as far as I know amember_products is the only table modified when adding a new product.

    Flixxx
  2. flixxx

    flixxx New Member

    Joined:
    May 18, 2008
    Messages:
    7
    ok, fixed it myself. I removed the product url from the config and now it works :)
  3. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Sweet, can you post (or edit your post to fix) the final URL and the scenario in which you use it?

Share This Page