Vosteen Posted November 1, 2016 Share Posted November 1, 2016 (edited) Hello, I'm going to misuse the mobile phone-field to fill it with our own customer ID (It's a long story short...). So I also want to show a customer it's ID on a prominent spot in our template. Therefore I need the right smarty variable, I guess. For the regular/native ID it's quite easy: $cookie->id_customer But what do I have to use to display the "phone_mobile"? EDIT: It once was about using the "website field". But now it hast to be the mobile phone number. Edited November 3, 2016 by Vosteen (see edit history) Link to comment Share on other sites More sharing options...
Kogkalidis Posted November 1, 2016 Share Posted November 1, 2016 It is supposed that you have an object with your logged customer data.Let's call it $customer if it' so then the field is $customer->website (or whatever is the respective field in the db). Regards,Konstantinos A. Kogkalidis Link to comment Share on other sites More sharing options...
ventura Posted November 1, 2016 Share Posted November 1, 2016 Something like that {Context::getContext()->customer->website} Link to comment Share on other sites More sharing options...
Vosteen Posted November 2, 2016 Author Share Posted November 2, 2016 Something like that {Context::getContext()->customer->website} Thanks to both of you! I'm going with this solution, Link to comment Share on other sites More sharing options...
Vosteen Posted November 3, 2016 Author Share Posted November 3, 2016 Hello again,thanks for your help.Unfortunately I guess I was a little to quick in marking it as solved I found out that I won't be able to add the "website" field to our order-csv-export. But I could add the mobile phone number, which we actually don't need in our shop, as well.So could you also tell me how to add this field as a smarty variable?I was thinking about {Context::getContext()->address->phone_mobile} but this doesn't work... Link to comment Share on other sites More sharing options...
rocky Posted November 3, 2016 Share Posted November 3, 2016 Try: {Address::initialize(Address::getFirstCustomerAddressId(Context::getContext()->customer->id))->phone_mobile} This will get the mobile phone number from the current customer's first address. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now