Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to change order item identity in cart

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-29-2018, 12:35 AM
 
go2ready go2ready is offline
 

Newbie
  
Join Date: Aug 2018
Posts: 3
 

Question How to change order item identity in cart

Hello there,

We have added some another ID to the order item, lets call it otherID. Now each order item have a productID that put the same order item into the same cart entry, so if I added two order item which have productID=5, otherID=1 and 2 respectively, they will be put into one entry in cart and there is no way to distinguish them.

Can anyone shred any light on me about how to change it? Do I need to make otherID part of order item's composite key?

With thanks,
Richard
__________________
JoJo Tech
Reply With Quote
  #2  
Old 08-29-2018, 04:01 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: How to change order item identity in cart

Could you possibly provide a screenshot with an example?
As I can see when I put two identical items into the cart, the minicart displays the multiplier, like 2x items in the cart.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 08-29-2018, 04:18 AM
 
go2ready go2ready is offline
 

Newbie
  
Join Date: Aug 2018
Posts: 3
 

Default Re: How to change order item identity in cart

Hey Alex, Thanks for responding. But the behaviour you described is the one I am aiming to change. Our system requires order to be added from 3rd party website, lets say it is from Reddit.com, the orderitem from that site is stamped with a ID saying that it is from which external source.

Our problem is that such ID is not a attribute value, so the cart will make no distinguish between the item added from external site and the item that is added in xcart.

We seems to found the solution is to change the getKey() implementation of OrderItem, so the key should contain the ID from external site. It should work in theory but we haven't tested it yet, thank you very much and any comment is appreciated

Thanks
__________________
JoJo Tech
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:34 AM.

   

 
X-Cart forums © 2001-2020