By ronron on Wednesday, 04 October 2017
Posted in General
Replies 7
Likes 0
Views 632
Votes 0
there are some information that i need to have on both hika and ES. same with the products that can be created on ES and displayed on Hika

the following are examples

1. vendor name
2. vendor contact details
3. vendor image
4. and more

can you tell me how to do this? to be precise i need to copy the data from ES field to Hikashop field. I understand that both are using their own set of tables so i hope you can give me an example code to execute this

can you tell me which views are the following? screenshots

also a language string issue

thanks
Hey Ronald,

1. vendor name
2. vendor contact details
3. vendor image
4. and more

I would suggest you to add a new custom field for your above fields, you can take a look how we do this for the Easysocial existing custom field for user. For example how we retrieve the user full name :
JoomlaFolder/media/com_easysocial/apps/fields/user/joomla_fullname/..

Once you have created these, you can discover these custom field from backend then assign these custom field to show into their Easysocial user profile page.

I already added this following untranslated string into your site language file.
/administrator/language/en-GB/en-GB.plg_app_user_hikashop.ini

APP_USER_HIKASHOP_INVALID_QUANTITY="Please enter a valid quantity for the your product"
·
Wednesday, 04 October 2017 12:09
·
0 Likes
·
0 Votes
·
0 Comments
·
hi

i already created custom fields.

my next problem is how to make the custom fields have the same data as the one in hikashop. Same as what you did with products, name of your product, product code, price etc. Please note that i need to replicate some fields from hika since my site is a combination of hika and ES.

for example on hikashop i have a custom field name seller name.

$this->row->seller_name;

on ES it is

$user->getFieldData('es-seller-name');?>

how can i save this on ES and save it on hikashop?

thanks
·
Thursday, 05 October 2017 22:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Based on your current requirement, you might have to do this following workflow :

1. After you created your own custom field then you have to install into Easysocial application side .
2. Once you installed, this hikashop custom field will be appear on this section (screenshot : http://take.ms/sVKJJ )
3. Then drag this hikashop custom field over there and save it.
4. This hikashop custom field will be appear on the user profile page.

From the PHP part :
1. if the system detected this user is one of the vendor, it will automatically populate the data.
2. when the user edit their profile and modify that hikashop custom field from the Easysocial and press save, it will be store this in Hikashop user table as well.

By the way, you can take a look of our code how to get the data from hikashop table and how to store those new data into Hikashop table as well, hope this will help.
JoomlaFolder/media/com_easysocial/apps/user/hikashop/hikashop.php (main app function)
JoomlaFolder/media/com_easysocial/apps/user/hikashop/views/profile/view.html.php (user profile page hikaShop listing page)
·
Friday, 06 October 2017 16:33
·
0 Likes
·
0 Votes
·
0 Comments
·
hi arlex

found a way to display the vendor image and other info.

1. wont this be deleted when we update the site?
2. how can i make a safe override?
3. i cant get to add classes or tags to the objects

example is this, to display the vendor name
echo $vendorName->vendor_name;

how do i add classes other than what i did below

echo '<div class="OutputClass" style="font-weight:800;" >';
echo $vendorName->vendor_name;
echo '</div>';
4. i want to display the vendor information i got in the profile page near this one es-profile-header__bd
i found this /.../components/com_easysocial/themes/wireframe/profile/default/default.php

is there away to echo the objects or do i have to redo the code to that page?

thanks
·
Saturday, 07 October 2017 14:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ronald,

1. wont this be deleted when we update the site?
2. how can i make a safe override?

Yes, as long as you create your own custom field in Easysocial, it will not get delete when you update to higher version of Easysocial.


3. i cant get to add classes or tags to the objects
example is this, to display the vendor name
echo $vendorName->vendor_name;

how do i add classes other than what i did below

echo '<div class="OutputClass" style="font-weight:800;" >';
echo $vendorName->vendor_name;
echo '</div>';

I think this question you should consult with Hikashop developer regarding this, because all the code was wrote from them instead of us, it might be they already implemented one method to retrieve vendor info, so you do not need to manually write a SQL query to get vendor info from the code.

By the way, if i am not wrong, they using this following method, perhaps you can give it try.

$vendorClass = hikamarket::get('class.vendor');
$vendor = hikamarket::loadVendor(true, false);


4. i want to display the vendor information i got in the profile page near this one es-profile-header__bd
i found this /.../components/com_easysocial/themes/wireframe/profile/default/default.php

is there away to echo the objects or do i have to redo the code to that page?

Try take a look of my screenshot here : http://take.ms/2qkWX
Do you want to display those vendor name into this user profile details page?

If yes, you actually do not need to modify that PHP file, if you create your own custom field in Easysocial, it will display vendor info directly on user profile.

First i thought you already created your own custom field in Easysocial to populate this on user profile? If yes, perhaps you can attach your custom field php file to us so I can have a look?

You can send us this as zip file. For example :
JoomlaFolder/media/com_easysocial/apps/fields/user/yourCustomAppName
·
Monday, 09 October 2017 12:36
·
0 Likes
·
0 Votes
·
0 Comments
·
hi arlex,

Try take a look of my screenshot here : http://take.ms/2qkWX
Do you want to display those vendor name into this user profile details page?


that is not the vendor name that is the basic information. apparently there is some confusion because we already have a user profile and vendor profile.

this is the user profile fields http://www.pwedepa.ph/edit-your-profile/profile?layout=edit

this is the vendor profile fields http://www.pwedepa.ph/my-pwedepa/seller-control-panel/vendor/form

i need the vendor profile to appear on this page http://www.pwedepa.ph/premium/profile/1676-ronald

i have attached a photo of what i need to do


If yes, you actually do not need to modify that PHP file, if you create your own custom field in Easysocial, it will display vendor info directly on user profile.


the vendor info is on this page http://www.pwedepa.ph/my-pwedepa/seller-control-panel/vendor/form

i already created some custom fields but it does not automatically change if i change it on hikashop

please understand that it will be impossible to have 2 separate vendor profiles, one for hika and one for ES
·
Monday, 09 October 2017 20:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ronald,

Arlex :
Try take a look of my screenshot here : http://take.ms/2qkWX
Do you want to display those vendor name into this user profile details page?


Ronald :
that is not the vendor name that is the basic information. apparently there is some confusion because we already have a user profile and vendor profile.

this is the user profile fields http://www.pwedepa.ph/edit-your-profile/profile?layout=edit

this is the vendor profile fields http://www.pwedepa.ph/my-pwedepa/seller-control-panel/vendor/form

i need the vendor profile to appear on this page http://www.pwedepa.ph/premium/profile/1676-ronald

i have attached a photo of what i need to do

I think i understand now, if you would like to add vendor profile info in this user profile page http://www.pwedepa.ph/premium/profile/1676-ronald , then you have to hack on this PHP file
JoomlaFolder/components/com_easysocial/themes/wireframe/profile/default/default.php

the vendor info is on this page http://www.pwedepa.ph/my-pwedepa/seller-control-panel/vendor/form

i already created some custom fields but it does not automatically change if i change it on hikashop

please understand that it will be impossible to have 2 separate vendor profiles, one for hika and one for ES

Yes, i totally understand that but unfortunately the current EasySocial version doesn't integrate with HikaShop extension, if you would like to achieve this as what you mention your current requirement in earlier, you should provide us with your custom field PHP file so I can better have a look whether i can give you some suggestion.

Like you said that when you update some of the info from Hikashop user profile here (http://www.pwedepa.ph/my-pwedepa/seller-control-panel/vendor/form), it didn't show the latest info on Easysocial user profile page http://www.pwedepa.ph/premium/profile/1676-ronald , mean some of the code is not correct the way you try to retrieve those info from Hikashop.

If those code related with Hikashop base, you should consult with Hikashop developer regarding this and see whether they can suggest you some of the correct way to retrieve vendor info through their existing method.
·
Tuesday, 10 October 2017 19:56
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post