How do I connect my appixia app to my prestashop contact page? - prestashop

I've added a contact button on the title bar but I can't get my contact form to display. Has anyone done this?

First of all, the contact button Module field should point to a new Activity module like VerticalContainerActivity which should contain an HtmlView module in its body. This HtmlView displays your contact page - put the address in its ContentUrl. Most of these steps are identical to what you'll find in this tutorial.
You can see an example of this in the diamonds sample app. Create a new app from the diamond store starting point and see how the contact button is implemented there.
The second important point to remember is that you shouldn't use regular store URLs in your Appixia app. When the user sees them, they would see your Prestashop theme with all the navigation and this will be very confusing inside a mobile app. Instead, make a mobile friendly version of your contact page which doesn't use your Prestashop theme and only shows the contact info content.
Using the Prestashop Contact Form in your Appixia app:
I'm not sure this is a 100% good idea in terms of usability. I don't recommend using a web form for contact in a mobile app.
A mobile phone is a communication device. It is has special integration for making phone calls and sending emails - I really recommend you use these methods instead. Look at the HTML source of this example to see how simple it is to integrate (it's just a link in your HTML).
In order to encourage your users to contact, you need to ask them for as little info as possible. Your website contact form makes your users type in their email address. If they email you directly through their device (with a mailto: link), their correct email will be filled automatically. Same with making a call, when they tap on the link, the number will be dialed automatically for them.
If you really insist on implementing the Prestashop contact form, this will require some Prestashop php games. You should find the contact form controller in the Prestashop source and create the same form (in php or hardcoded HTML) without your website theme. It will be a little annoying because after we submit the form, we also need to make sure the confirmation message is also displayed without your website theme.

Related

Redirect to calling application when click the button

So I just chatted to one of line(one of social media) official accounts and they send me a message then when I clicked the button "Call us" it redirected me to my default calling application on my phone and filled out their number. Does anyone know how to do the same thing ?
That is probably an example of tel protocol.
You basically make an HTML link just like any other link, but rather than the href containing an http:// link, the link format looks like this:
tel:1-123-456-7890
When the user clicks it, their operating system sends this number to their default app for handling tel protocols, which is usually a phone app.
Here's an article useful for explaining this protocol, as well as some handy information about using it in CSS:
https://css-tricks.com/the-current-state-of-telephone-links/

Can a Shopify Public App extend the "Add/Edit Product" page?

I am building a new Shopify public app that displays a custom input in the product listing page (at the customer side).
So to enable this, the Shopify Admin should be able to choose specific products to enable this input. And I see two ways to implement this.
Extend Add/Edit product form to add a new section that houses my app-specific config options. See the image for an example.
If the 1st option is not possible, I will provide a separate form on my app page to select products and configure my app-specific options.
So is it possible to do #1? Also, which option is the better way of doing things here?
Any links to documentation would be helpful.
You can't modify the admin panel in any form using an App.
The only thing you can do on these pages is to add a link inside the "More actions" to your app page.
You can use extensions/bookmarklets/userscripts to create some custom logic to modify the admin page and communicate in some overly complicated way with your app but it will require more steps for the customer to work with your app which is not a very friendly way and you may not pass the review process for public apps.
TL;DR you must handle everything from your app screens and you can't modify the admin front-end in any form to add additional stuffs or modify existing ones.

Login screen for a Ext JS 4.0.7 application

I've developed an Ext JS 4.0.7 app for my company. It has various modules for different team's needs. Now, the company want to make sure only relevant people have access to relevant modules in an app. It's an ERP application which has CRM, MRP, Engineering, HR and Finance modules. Now, respective team members should have access to respective menus and pages and super admin will have access to everything.
I know how to control the menus based on user login. But not sure how to integrate user login screen into my app. I know basics of Ext JS and able to design a Login screen using form panel ...... but not sure how to make it as my app's first screen and upon successful login, let the user in and able to logout from there.
If anyone already developed such functionality, i request to share the solution here. Any pointers or code snippets will be a great help.
Thanks very much in advance.
My application has a header (company logo and app title - horizontal on north) and left menu and content panel.
So, here is how login/logout screen implemented.
When app is loaded, when viewport is loaded, on render, I load menu store and load 'Login' and 'Change Password' menu items in them.
When user enters login/pwd, via ajax call , will call servlet and process login data. Upon login successful, based on user role, respective menu json built in server side and menu store is loaded with this json. This json has 'Logout' menu by default. So, when user logs out, will load Login screen in content panel.
Not sure whether any other best ways to implement the same. But this is working well.

How to change in template through the Shopify application

I am trying to write a Shopify application and I want to add a section to the product page when the store owner installed my app. I tried this by adding a custom script tag in the shop template and this tag will load and inject my desired HTML into the page. It's work but it needs to force the store owner to change the product page template and its not user-friendly.
I see some apps in the Shopify app store that can change the product page after you install them without needs add any part to the product page template. How they do this work? I can't find the correct way in the Shopify documents.
You can change the Shopify theme of the shop using The API for Assets:
However as drip mentioned this is not a good idea:
If you change the theme auto-magically via code, you are looking for trouble. A lot of things can go wrong - simply you cannot cater for all themes and their changes over time! So you could possibly leave a broken page after the change. The e-shop owner won't be impressed! Actually a lot of the 1* reviews of apps are for that reason!
What would happen if the eshop owner removes your app? He won't know what code to remove.
So, most apps ask the user to add the app code. They provide detailed instructions of course.
Fyi, another problematic approach is the following:
Some apps may attempt to change the DOM "on the fly", by first locating an existing DOM element (a lot of theme-specific if statements to do that with any degree of success) and, then insert the app's DOM elements.
That's very messy and problematic as well, but at least you do not risk ruining the owner's theme files. In the worst case he can uninstall your app and he 'll be ok.

Laravel tests from the website

I am looking for a way to make test cases that can be added to the admin dashboard of a laravel website. For example if a page on the website does contain a form to submit to the database in the dashboard the form can be tested for errors and even submission speed and if the form is collecting the right type of data integer field and string fields.
I click of a button and the forms and content will be tested.
I would really like to know how I can setup something like this but not really sure what to search for, any links are welcome to a website or message.
Best regards