WP eCommerce
[resolved] Show one item in cart but increase price (3 posts)

  1. Morphim
    Posted 2 years ago #

    Hi there.
    I need to have several products that don't increase the 'items in basket' but do increase the price.

    For example, I want to offer meals per person, so the quantity field is actually for number or people rather than actual quantities of the product.

    So, product 1 might be for a starter course at $5 per head.
    If 100 people want this, I need the basket to say '1 item - $500' rather than 100 items each at $5.

    Is there a way to achieve this in the code?
    Anyone with php knowledge who can point me in the right direction would be greatly appreciated.
    Thanks in advance : )


  2. vark
    Posted 2 years ago #

    I believe the qty field is intrinsic to the function of the whole plugin, and can't be used in the manner you're proposing. I think that Qty can only = # of items purchased.

    That being said, there's a couple of ways to achieve what you want. You could use variations to offer a meal count range - for example,
    offer variations for 1-10 @$5 per head, yielding prices of $5 - $50. Further variations could be at ascending intervals of 5, 10, whatever makes sense.

    Alternatively, you'd have a fair amount of php coding to do, I think. You could use a 2nd field on the screen, store it let's say in the product note field (that way it would show, I believe, on the receipt), and do behind-the-scenes php to modify the price on the fly. Much more difficult.


  3. Morphim
    Posted 2 years ago #

    Hey, Vark

    Thanks very much for taking the time to reply. I appreciate it.
    My client wants just the 1 item with the updated price depending on the number of people.
    I've suggested variation dropdowns but the numbers could be from 4 to 500 so it would be a huge list and not ideal.

    I'm no php'er so not 100% sure what your alternative actually means but it hopefully shows that it is fundamentally possible.

    Thanks again for your reply.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.