Populate "Requested For" in shopping cart page

manasaks
Kilo Contributor

I have a order guide with a variable "Select User" as in following screen shot :

find_real_file.png

How can i populate the selected user variable in Requested for field in shopping cart page as follows

find_real_file.png

Any help would be appreciated.

Thanks

Manasa

4 REPLIES 4

Chuck Tomasi
Tera Patron

Locate the variable on the order guide and set it with the default value:



javascript:gs.getUserID()


bpippert
Tera Guru

I think what you are wanting is to copy whatever value is populated in the "Select user" field to the "Requested for:" field.



Assuming this is correct, and you are using the sc_layout driven cart macros, you could create a copy of the UI Macro: sc_cart_view_requested_for. Modify that copy to display the value in "Requested for:" with whatever you want. Then, modify your cart layout to use this UI Macro instead of the delivered sc_cart_view_requested_for.   Keep in mind that sc_cart_view_requested_for is used for all carts, so your logic will have to deal with all orders, and not just those using this particular Order Guide.


Thank you Brad Pippert and ctomasi. Will try it out.


How to bring selected user name into requested for..Can you please tell exact coding line