Same Product Multiple Times

Discussion in 'Customization & add-ons' started by dandare2020, Jul 24, 2011.

  1. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Hi All.

    If just testing this software at the min to see if it will do what i require.

    Ive got it setup most of the way there's just a few items i need to change the main on e being a user being able to buy the same item multiple times. I have added a field to the product page and added this to the member.php and i can get the data from it great but it just keeps adding the subscription onto the exsisting of the same product. i would like to always create a new sub with the data added. Is this possible

    Many Thanks

    Dan
  2. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Is this possible does anyone know just a quick idea of the best way to go would be great

    Many Thanks

    Dan
  3. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Hi does anyone have any ideas on this.

    Many Thanks

    Dan
  4. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Can you explain what it is you want to do? I dont understand from the above description.

    David
  5. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Basically. A user can order the same product multiple times i feel there are to ways to do this. The first being in the member.php you pick the same product and click add and it just adds a new product and does extend the previous product.

    Number two. I have created a Field within the products call plate_no. I have added this as a text box in the members.php page and when you enter data it adds it to the sub info. I don't know if it would be possible to work it so if they add a new sub with a differant plate_no it creates a new sub but if they create a sub with a same plate number it extends that sub.

    I don't mind sorting it either way really the second way is more automatic but i don't mind the work involved in the first idea and plus the first idea seems easier untill i can work out how to do the second.

    Many Thanks for your help

    Dan
  6. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Can't help but ask- why are you using a membership system for this?
    Seems more like a shopping cart issue.

    David
  7. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Hi

    I thought about this products because i used it before and the way it links to PHPBB3 a shopping cart doesn't add new users and then crosses over to phpbb3

    Cheers

    Dan
  8. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    You should be possible to hack amember or make a plugin so that the product X when its added starts today till XX weeks from now vs. adding time to an existing product - is this what you're looking to do?

    Why would people be reordering the same product (is it digital?) and not getting more time added? Sorry, just having a hard time visualizing the flow/need for this.

    David
  9. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    no it's me i've never been good at explaining stuff. Basically we have a product that you can have multiple in your home but each has a differant plate no you receive information on the unit for a set period of time like one month 6months or a year which the user pays for. But if they have multiple units they could have brought them at differant times and will have differant plate no's. I just don't want a user for each box. The way i have figured to do it but unsure which files to edit and where is. Add field in Products to add the box number, Place field on member.php page so they can view already purchased products and plate_no and add a text box so when you click order the query is if subscription and plate_no exsists then extend if not create new. Just a few pointers would be great the if sub and plate_no exsits is the main bit i could do with help on

    Many Thanks

    Dan
  10. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    does that make more sense if you require and more info i'll do my best

    Cheers

    Dan
  11. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Might help visualise it if you actually gave some information what this product is that you can have multiple examples in the home with a different plate!!
  12. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Hi I'll try and clear things up a bit.

    We i have is a site that people can view personal camera's from such as cctv. Each camera has a Plate_no such as a mac address. The users have to subscribe each camera for it to show up on the system (webpage). So i would like a way for the user to add multiple of the same subscription but the only differance is a extra field called Plate_no. Any ideas on code would be great

    Many Thanks

    Dan
  13. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    What payment ystems you wil luse for this?
    Several customizations will be required here.
    When you add field for Plate_no you will need to add it to payment and not to user's profile.
    You can use add_payment_field for this. Also customization to payment plugin may be required.
  14. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    hi thanks for your response. Could you give me a bit more info on add_payment_field please

    Many Thanks

    Dan
  15. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Dan,
    Here is how it can be used:
    add_payment_field("fieldname", "Field Title", "text", 'Field Description');
    Field will be available in aMember CP -> Edit user -> User payments -> Edit payment
    Or you can access it from your script:
    $payment = $db->get_payment($payment_id);
    print $payment['data']['fieldname'];
    Field will be set automatically if you will add input with name='fieldname' to signup or renewal form
  16. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Hi thats great. One last thing how do you get the system to just add a new sub for example if the number in the added field is diffrent add a new sub to the system and not extend the previous

    Many Thanks

    Dan
  17. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Not sure I understood. It already should add new payment when you purchase something from signup/renewal form.
    If you mean payment begin/expire date, have a look to aMember CP -> Manage products -> Edit Product -> Renewal Group setting.
  18. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    Hi all

    Could someone point out where when you click order/renew it checks to see if it's an existing ordered subscription. I'm wanting to add a AND to it so it checks if they have had the sub with a petcular custom field if not add a new sub

    Many thanks

    Dan
  19. dandare2020

    dandare2020 New Member

    Joined:
    Jul 24, 2011
    Messages:
    26
    is this possible

    Many Thanks

    Dan
  20. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Dan,
    Please clarify what you mean. aMember always add new payment when user purchase something from member's area. Also there is no such check.

Share This Page