Skip to main content

Is there a way to export "Subscriptions" to a external file?

More
5 years 4 months ago #332912 by joshualdouglas
-- HikaShop version -- : 4.4.2
-- HikaSerial version -- : 3.1.2
-- Joomla version -- : 3.9.26
-- PHP version -- : 5.6.40

Hello,

I want to be able to see a list of my subscriptions with both the "Subscription plan" and "email" present. Is there a way to export "Subscriptions"? If not, is it possible to add the user's email address to the subscriptions list? - Please see attached image

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #332918 by Jerome
Hello,

You can use a view override for the backend view "subscription / listing".
In that view, you will find the content
Code:
if(!empty($row->username)) echo $row->username; else echo '<em>' . $row->subscription_user_id . '</em>';
which is dedicated to the display of the user ; you can add the display of the email address (in the same table column or in a new one) thanks to " user_email "

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: joshualdouglas

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #332924 by joshualdouglas
Hi Jerome,

Thanks for the message.

I have found this file and I understand what needs to be done. Sadly I have very little PHP experience so could you please help me put this together? Ideally, I would like to remove the "Username" column and add "Name" and "Email. After this I shouldn't need any more help!

Thanks

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #332937 by Jerome
Hello,

So replace the content I mentioned in my previous message with
Code:
echo $row->user_email;
And you will display the user email instead of username.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: joshualdouglas

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #332959 by joshualdouglas
Hi Jerome,

Thanks for this! Works perfectly.

Could you please tell me how to replace "ID" with "Name"?

Thank you

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #332997 by Jerome
Hello,

It depends what you mean by "name". The information can be more complicated to retrieve and could require code modification in order to perform extra SQL queries.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: joshualdouglas

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #333061 by joshualdouglas
Hi Jerome,

Thanks for your reply.

I have attached the "Name" that I mean.

Thanks,
Josh.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #333078 by Jerome
Hello,

So that's the Joomla "name" field that you can display thanks to :
Code:
echo $row->name;
If it would be the lastname from the HikaShop address table, it would be a lot more complicated.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: joshualdouglas

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #333085 by joshualdouglas
Hi Jerome,

Thank you.

Again I'm a PHP noob. What do I replace in subscription/listing to replace
Code:
echo $row->name;
with ID.

Thanks
Last edit: 5 years 4 months ago by joshualdouglas.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #333107 by nicolas
Hi,

Well. You could add that code after the line:
echo $row->user_email;
that you've added before.
That would add the name after the email address on the listing, in the same column.
The following user(s) said Thank You: joshualdouglas

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #333157 by joshualdouglas
Perfect. Thank you so much!

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.244 seconds
Powered by Kunena Forum