Contact_us

Open to all! Ask other shopowners for help.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Contact_us

Post by heatherbell »

We've recently been working on adding module content to contact_us and started to modularise the page in a template to suit our purpose so we currently have something like this WIP:
Screenshot-2022-06-08-075014.png
However, before we go further down that rabbit hole, we wondered if modularisation of that page would be on the horizon in future core or PRO versions?
Perhaps there a better/easier/preferable way of adding content without doing that? (besides adding it all into a language constant)
You do not have the required permissions to view the files attached to this post.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Contact_us

Post by ecartz »

I'm not opposed to modularizing the page in core. I would not want it to be modular in Pro but not core. It's possible that Pro might have modules that core does not. Core would need to have Title and Form modules to match what is currently there. Hours and Map could potentially be Pro modules.

I don't particularly want to modularize the page in the 1.0.8.* series, as I'm generally finished with the catalog side. But it's not impossible.

In general, modularization seems more Burt's thing than mine. PI layout? Your example has two half-width containers. The PI layout might be a Pro module.

The only way to customize the content now is by hook or template, but it would probably be difficult to create your example layout via the form injection hook. A modular template as an override would be possible.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Contact_us

Post by heatherbell »

ecartz wrote: Wed Jun 08, 2022 8:47 amI would not want it to be modular in Pro but not core.
Not sure I understand that wording but I think I know what you mean.
Yes, everything you posted is pretty much what I had thought.
Our example is WIP and 'half way' there with PI being the next stage further down the rabbit hole for us.
I guess that an easy way of adding modular content would be welcomed and good to know that it could be on the horizon - thank you.
Omar_one
Senior Contributor
Posts: 676
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: Contact_us

Post by Omar_one »

@burt has module maps shows on the contact_us page (28d 2019, OSM Maps) by adding modular content, and I think it will be easy to add more modules ,, but its need to have modularization layout to be like PI layout
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Contact_us

Post by burt »

I *think* it would be as straightforward as copying the contact_us.php page from "default" into "override" (if using override template, otherwise whatever template)...then stripping out most of the code, ending up with something like "product_info.php" in terms of code (ie quite "light" in actual code). Then make a "modular" content module for contact_us, along with at least one PI module for contact_us.

That PI module would be the normal "form" / success message, and then any other moduels would be coded up as and when needed (eg by addon makers, normal users, core code additions or whatever), either as contact_us content modules or as child modules for the new contact_us PI. I can look into doing something if it would be of value in the core code?
I am not here to build for you.
I am here to build with you. Let's help each other.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Contact_us

Post by heatherbell »

burt wrote: Wed Jun 08, 2022 4:34 pmI *think* ...
That's pretty much what I've done in the example.
I used OpenStreetMap for the map.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Contact_us

Post by ecartz »

burt wrote: Wed Jun 08, 2022 4:34 pm That PI module would be the normal "form" / success message,
And also, I was thinking that for consistency, there should be a cu_title.php module.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Contact_us

Post by burt »

I think this is the start of it, or somewhere near the start anyway, consists of;

1. new admin page for CU pi modules
2. new admin link for horizontal menu

Upload /admin/ folder contents to whatever your admin is called. As usual.

3. template page for contact_us (massively stripped down)

Upload this into whatever template you are using (in the zip I placed it in override)

4. new Normal content_module for Title
5. new π Modular contact_us content_module
6. new PI module for CU (just a simple Text module for testing)

Install these as per usual;
#4 via admin > modules > content
#5 via admin > modules > content
#6 via admin > layout modules > contact us

Let me know if anything errors out as I may have missed stuff from the .zip


Of course, as always, you would NOT want to do any of the above testing etc on a live site as it would mean that your shoppers would not be able to contact you, as there is no "form" CU PI module in the .zip - as it is not coded.
You do not have the required permissions to view the files attached to this post.
I am not here to build for you.
I am here to build with you. Let's help each other.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Contact_us

Post by heatherbell »

burt wrote: Wed Jun 08, 2022 6:37 pmtesting etc
Works as expected
Screenshot-2022-06-09-060329.png
You do not have the required permissions to view the files attached to this post.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Contact_us

Post by burt »

Untested, but logically...should work...

Zip is only a CU PI module for a contact form. It basically takes the same form from the original contact_us page and recreates it as a PI Module.

Anyone testing would need to have installed (and turned on etc) the previous .zip
You do not have the required permissions to view the files attached to this post.
I am not here to build for you.
I am here to build with you. Let's help each other.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply