0

After adding a gift card to the shopping cart (a random WCS example: https://store.sony.com/webapp/wcs/stores/servlet/SYGiftCardView?storeId=10151&categoryId=8198552921644551354&catalogId=10551&langId=-1), what DB2 table are the fields for 'To', 'From', and 'Message' stored in?

What query can be ran to grab a gift card's database info. (such as the personalized message) with that particular order ID?

How do you identify the specific gift card (the one added to the shopping cart) given your order? Will the gift card have its own unique id like order id / where do you find the gift card's unique id?

Thanks

Chandrew
  • 16,987
  • 4
  • 24
  • 40

1 Answers1

1

Looks like to be a custom thing. I have check on the InfoCenter and the source code and there is no information about that.

In your exemple on Sony website, the Gift card is just a special product. When you click "Add to cart" on a product, you get an OrderId and a OrderItemId.

I gess they put the information "From" and "To" inside a custom table with the orderitemId as a relation key, or a custom field of orderitem table (field2 for example is a varchar).


EDIT

Finaly, the table ORDERITEMGIFT seems correspond to you wish. You can take a look to the infocenter description

I'm not sure that table should be used like that but the description of the field GIFTMESSAGE looks interesting.

A message to accompany the gift (order item), from the gift giver to the gift registrant.


Hope my answer is helpful.

Regards, Dekx

Dekx
  • 402
  • 2
  • 15
  • I am sure the fields are customizable, but are you sure the gift cards are a special product and it is a not a WCS7 feature? Other examples include: [link](http://www.sears.com/shc/s/gc_Physical_10153_12605) and [link](https://secure2.homedepot.com/webapp/wcs/stores/servlet/GiftCardProductDisplay?storeId=10051&langId=-1&catalogId=10053&partNumber=199999959&gcval) – Chandrew Aug 21 '12 at 14:23
  • Do you know if they are treating it as a special product and like you mentioned making a custom table? – Chandrew Aug 21 '12 at 14:32
  • I'm not sure. But as I said, it look likes. I'm sure that theses gift cards are considered as products by the website. They have productIds and if you add them to cart, they take an OrderItemId (look at all hidden forms of th shopping cart). About the way to store the informations "From" and "To" all the examples you gave have different naming conventions. So I think it's not an out of the box thing. – Dekx Aug 21 '12 at 19:14
  • And because I'm not able tou found any information about that kind of stuff on Internet or the Inforcenter, I'me sure that WCS doesn't have that feature. Commerce Allow you to buy with a gift card, but not tu sell gift card with some custom messages like on your examples. – Dekx Aug 21 '12 at 19:19
  • But you can considere that each design are items/products. So you just need to find a place to store the informations like "From" and "To". Using Field2 of orderItem (with a separator) can be a really easy way to deal with. getters and setters are already here. So no need to develop a custom table. ;) – Dekx Aug 21 '12 at 19:24
  • Ok, maybe I made a mistake. The Table ORDERITEMGIFT seams correspond to your need. Lets take a look to my edited aswer. – Dekx Aug 21 '12 at 19:56