Jump to content

Get logedin Customer's profile field in product page ?


Recommended Posts

Hi, i've made few fields in registration, they're working and so on, i can retrieve them in Indentity page, but how can i get customer value (those fields -i've created) in product page??

I want to do this- customer enters his email and license number, when he click on submit when registering script checks his data-and stores number in DB field in customer table, so i want when customer is in product page i can retrieve this field.

{$smarty.post.fieldname} doesn't return the value in product page.

Link to comment
Share on other sites

can support help me? or they just answers to questions like- click there and check this and that? i need developer to help for this.. all i need-just tell me what file to edit..i spent 100 hours doing it but i need to know what internal function there is to get this working?

Link to comment
Share on other sites

Hi Tommix, I'm not sure I can give you the exact file, because I don't know how or which files you've updated, but I can tell you that you need to assign the new values before being able to see them in the tpl file. eg. $smarty->assign('CustomField', $CustomField);

Link to comment
Share on other sites

but how can i assign if product php files don't recognize customer classes and so on...coockies...

lets say-i need to get customers email to show in product page -that's will make more clear what i want :)

in those tpl who is customer related i can paste this: {$smarty.post.se_valid} (se_valid-is my field) -and it shows it, but in others -it doesn't work.
so i need to get method used in presta to get curent customers field..in my case se_valid-or let's say-email.

i also need to know when the client is logged or no-so if not logged product pages does one thing if logged-another..in OpenCart i made all i wan tin 40min.s here is more difficult.

Link to comment
Share on other sites

Can you post or attach the changed code so I can test on my own version. If I have your code, I might be able to find the files that should help you specifically.
I'm actually trying to do a similar thing, but instead of adding to the current details eg. birthday, etc. I'm going to add "profiles" for each customer, so they can use these for different products. eg. Their sizing measurements for clothing.

Link to comment
Share on other sites

i don't remeber what i've changed cause i'm working for the same in two diferent cart scripts. Opencart is really easy to customize..very easy but have problems with paypal.

you don't need my code to know how to make it work..it's the same as get email..i just added 2 fields in registration, and 3rd in DB so customer fills his license details, email-my scripts via cURL contacts the 3ed party server and gets is this data ok-if ok my scripts writes value to se_valid DB field, and i make my products aviable only for those who is valid-so when customer comes to product-if he don't have valid license-he cannot buy a product, so i need to read that se_valid field :) or even customers ID so i cna make query by using id and get that field from db :)

but because of PrestaShop "support" don't give a damn i'm thinking to stay with OpenCart. all my code works, only problems with IPN bu this is just for me.don't know why :)

so try it you too :)

Link to comment
Share on other sites

Hmmm... if it works in opencart, then I would continue there... also open cart uses the code igniter framework, so you'll be able to get some pretty good support there, both for opencart or from codeigniter.
I would just iron out the paypal problem.

Link to comment
Share on other sites

×
×
  • Create New...