Developer forum

Forum » Ecommerce - Standard features » Add multiple unique products to the cart with one quantity field

Add multiple unique products to the cart with one quantity field

Martin Christensen
Reply

Hello,

I have an issue that can be attacked from multiple angles. Here's the case:

Our customer sells airtime for satellite phones. It's a unique code that gets you 1, 2 or 5 hours of airtime.

We can create a single product for every code (about 100 codes with different values) and just enter the code in a product field that shows up on the receipt after purchase.

However, the customer wants their users to be able to add multiple codes to the cart at the same time. And they dont want the end user to see 100 nearly identical products in the shop.

Can we achieve this somehow? Or is it just better to find a way to dynamically output the unique codes?

 

Best regards,

Martin Christensen


Replies

 
Nicolai Pedersen
Reply

Hi Martin

I am not sure I understand - do you have some kind of screendump?

 
Martin Christensen
Reply

I'll see if I can clarify:

The products are like prepaid phone time. Each product is a unique code of 10 characters like 2455C55L9M. You enter the code into your satellite phone and get 1 or 2 hours of airtime.

The code needs to be made available to the customer after the purchase is complete.
We can easily make a SKU for each of these unique codes with a stock of 1 and display the 10-character code after the checkout.

The problem: The shop needs to allow the customer to add 4 codes of, say, one hour of airtime to the cart at once. And we don't want to show 100 different products when there essentially is only 3 distinct products.

I apologize if it's still not clear. It makes complete sense in my head :)

satcode_example.jpg
 
Nicolai Pedersen
Reply
This post has been marked as an answer

Now I understand - thank you for explaining.

I do not think having a product for each code would be a good solution.

So what I think you need is a place in your solution where you have a list of 1000s of codes that matches the one hour product. You could probably do that using a simple item type that you place on pages - either as item based pages or item based paragraphs on a page - something like this:

  • Phone codes (Folder in the page tree)
    • One hour codes (Page with one paragraph of item type "PhoneCode" for each code)
    • Two hour codes
    • Three hour codes

The item type will then have 3 fields - "product", "Unique code" and a "sold" checkbox.

If a customer buys 2 qty of the one hour product, you will take the next 2 available codes from the above list and add them to the receipt the customer receives and mark the codes as sold. Requires a bit of coding.

BR Nicolai

Votes for this answer: 1
 
Martin Christensen
Reply

This is a good solution and it won't take up a lot of SKUs. The customer should be able to easily manage their codes this way.

Thanks for taking the time to understanding the issue!

 

Best regards,

Martin Christensen

 

You must be logged in to post in the forum