You must specify a name to add a product to your shopping cart.

leehughesleehughes Member
in Help edited February 2010

Am nearly there with the whole thing, just set up custom fields with my wordpress and styled my form..

But when am trying to test it am getting this error on my foxycart pop up

You must specify a name to add a product to your shopping cart.

Not to sure what this means

see link
  • leehughes, your site is down at the moment, so I can't comment on your code, but FoxyCart needs a name for the product. If its in a link, you need to include
    in the url params, or if its a form, you include a hidden input like
    <input type="hidden" name="name" value="Product Name" />

    Hope that helps
  • Sorry..

    deactivated it now..

    It's in a form using custom fields via wordpress.. The name is hidden and can only be changed via custom fields..

    I have entered a product name i.e Blue prom dress

    But getting that error..

    Am not a developer so I have quite basic understanding :)

  • leehughes, there is no hidden name input on that page.
  • ok thanks..

    So this is code we are talking about yes? <h4><?php echo get_post_meta($post->ID, 'producttitle', true); ?>

    And I need to hide this?

    thanks again
  • Hi lee,

    No you don't hide that one, that is your title for the product.

    Under the line in your template that outputs the price (
    <input type="hidden" value="£100.57" name="price">
    ) you need to put this line:
    <input type="hidden" value="<?php echo get_post_meta($post->ID, 'producttitle', true); ?>" name="name">
  • Ahhhh brilliant.. thanks ever so much..

    All working now.

    1 step closer :)
Sign In or Register to comment.