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

  • Posts: 220
  • Thank you received: 12
3 years 5 months ago #332912

-- 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

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 5 months ago #332918

Hello,

You can use a view override for the backend view "subscription / listing".
In that view, you will find the content

		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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
3 years 5 months ago #332924

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 5 months ago #332937

Hello,

So replace the content I mentioned in my previous message with

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
3 years 5 months ago #332959

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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 5 months ago #332997

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
3 years 5 months ago #333061

Hi Jerome,

Thanks for your reply.

I have attached the "Name" that I mean.

Thanks,
Josh.

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 5 months ago #333078

Hello,

So that's the Joomla "name" field that you can display thanks to :

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
3 years 5 months ago #333085

Hi Jerome,

Thank you.

Again I'm a PHP noob. What do I replace in subscription/listing to replace

echo $row->name;
with ID.

Thanks

Last edit: 3 years 5 months ago by joshualdouglas.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #333107

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.

  • Posts: 220
  • Thank you received: 12
3 years 5 months ago #333157

Perfect. Thank you so much!

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

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