Shopify app integration theme issue - css

I am developing application for shopify, which replace login and register links to another links, creating a custom pages. For example when user click to login link? it is not redirect to login page, it is open a popap with login form. Also my app create custom pages. For example people page, where shows list of customers. And also a want to customize product page by adding a new fave button. In people page for each people shows count faves and last three faves product with images.
So my problems is theme layouts. Because each theme have self layout and css. I want to my app support all themes. How can i do it?
Sorry for my bad english. I just learning... ))

You have two options here, http://docs.shopify.com/api/tutorials/application-proxies and http://docs.shopify.com/api/scripttag.
App proxy sounds like the solution for your separate 'peoples' page.
If you want to assume that all themes have a log in link (which they all should but it's completely customizable so it's possible some don't), then you could always do something like this
$("a[href='/account/login']").click(funciont() {// show modal}); This isn't guaranteed to work in all themes but it probably will in most.

Related

Combine HTML site with Wordpress

I have a website i coded alone with HTML, CSS, JS and JQuery, and I want to add service payment functionality (not e-shop with items, but give clients the ability to submit forms, pay on the website and receive the appropriate services online, so they don't have to come on-site. I want to use WordPress so I can use the woocommerce plugin, cause I'm feeling that's a safer option that coding something myself. How can i get my site and woocommerce working together without having to create the website again using plugins? I know that i can add code blocks, but that means I'll have to keep the title panel on top of the page, and I find that unappealing, and the plugins that exist for removing those aren't a great solution imo. can someone help?
Per my personal opinion, you can do this by simply installing wordpress and then a basic theme. then installing all you need for your woocommerce. then a link that goes to the woocommerce whenever it needs to go there. It is not really a big deal.
Eg a menu that says buy now with a link to woocommerce and predefined amount. so when the user clicks the buy now button, it goes to woocommerce to continue.
so your website will be in 2 parts. a part for information (Your HTML Site) and a place for interactions (Wordpress).
Some websites have similar instances where depending on what you are doing the theme changes.
I however will recommend you go through the pain of doing your whole site on wordpress or simply finding other options to integrate the payments you want to in your current design.
This is for a uniformed design and will make your users/clients feel more secured instead of feeling they are being moved through sites.

woocommerce - add a new functionality to the theme along with its UI

I am new in wordpress world and i am planning to do a small store website, all the functionalities i need are already there in woocommerce, but there is this small functionality i need which is as below:
in the homepage i need to show 3 different services are served from the company and each service will have a button which will show a popup or redirect the user to another page.
the popup or the new page will ask the user to enter his information along with his mobile number so the company could contact him.
and i have chooses this theme https://themebeez.com/demos/?theme=orchid-store
and here is a picture of where exactly the change will be
So my question is what is the fastest way to do that, is there a plugin to do this for me, or i should make the actual functionality myself and edit the theme code also manually?
Thanks.
In the homepage i need to show 3 different services are served from
the company and each service will have a button which will show a
popup or redirect the user to another page.
Basically 3 buttons that got you to another page. That can be easily done with just editing the template. Look the support documentation to see if your theme can be edited by some page builder (mine uses Composer, etc) and just add the "buttons", if not you need to edit the template manually with some HTML. Nothing to complicated, it just HTML, not PHP or JS.
the popup or the new page will ask the user to enter his information
along with his mobile number so the company could contact him.
Blockquote
Please clarify, popup or a new page? If it is a new page, when you create the 3 buttons on the homepage, just connect that to a new page each (in the Admin Panel, New>>Page). That it is easy as just but the <a href> tag. But also, that's just how I would do it in a short time.
So my question is what is the fastest way to do that, is there a
plugin to do this for me, or i should make the actual functionality
myself and edit the theme code also manually?
Asking for plugins is offtopic in SO, also, where is going to go that data? In the database? or is going to be sent to some admin email? Please see the How to Ask
But I think there is exist a lost of plugins to help you with that. You just need some custom fields so Have you tried searching for some? I use one to get in contact with clients which may fulfill your requirements

Wordpress copy of Google Sites

I have a google site https://sites.google.com/site/shahriarinia/ and I want to build its equivalent in wordpress. Features are:
Have 100+ pages in website that are organized in a hierarchical manner.
Have a side bar navigation of the whole website in tree form (this is the ONLY reason I loved google sites)
be able to attach a file to a page (This is not too critical but if possible that's highly appreciated.)
To all WP gurus: how can I do this? which plugins/themes shall I use? I don't care if I have a blog there, having a blog is the least priority. I am the only user of the site, so there is no roles or other users using stuff.
Something like CMS Tree Page View but not for admin purposes but for the actual site.
Thanks
You can have a hierarchical manner , you can build a bar navigation. Look your Option Menu and look " Manage Sites"
If you want to attach File on a page , look your "Option Menu" or press "m" and look page Settings and Allow attachments.
For you bar Navigation , Menu option and " edit site layour".

Custom form in Wordpress?

I'm making a wordpress site which looks like and behaves less like a blog and more like a classic web site. I need to make plenty of custom forms and by now I have three equally bad solutions to this.
One would be to create each form as a theme template file. Those pages would submit data to themselves and all would be great, except the fact that I don't really like my plugin and theme to be so hardly connected. I think that theme should be for design only, which means header, footer, etc... and that plugin should handle all the other work.
Second solution is to make some controller.php file somewhere in my plugin folder and then all requests should be directed to this controller which would control what page should be displayed and how. And each page should be made with the use of WP short codes located inside my plugin folder. Problem with this approach is that I have problems transfer POST parameters, after I submit a form. I would submit a form to my controller which would then redirect it to a page with all POST parameters lost.
Third solution would be to target actual pages which display content with the use of WP shortcodes, and when user successfully submits the form shortcode would instead of the custom form, return some Thank you message. Problem here lies in fact that if you hit refresh while Thank You message is displayed browser would submit the form once again. And again and again, every time you'd press refresh.
Simple question. How would you do it?
Would it be the first way? I see many people doing just that, hardcoding their custom forms inside template files, even though it may be not the cleanest solution. Hmm... Still, I would like to separate my forms and logic away from my theme.
Greets
There are a couple of good form solutions as existing plugins. The two that come to mind immediately are Gravity Forms, which you must purchase:
http://www.gravityforms.com/
or Formidable Forms, which has a free basic version and a paid advanced version:
http://wordpress.org/extend/plugins/formidable/
I would definitely suggest using a plugin. It's best to keep design and functionality separate when possible. Both of these plugins are pretty simple to use. I know formidable uses shortcodes, but I'm not sure about Gravity Forms

Can Wordpress Duplicate An Entire Page Structure?

I have a wordpress site that i've been working on that has some pages (as in NOT posts) that a client changes content on in order to target particular keywords. these pages have been using podscms for content management.
The client now wants to be able to duplicate these pages any number of times and edit the text within them. So basically, he wants to be have a dozen or so versions of about 4 linked pages.
Does anyone know if it's possible to duplicate an entire multipage structure like this in WP?
Or any WP driven sites that implement segmentation similarly?
I think your best bet would be to use Page Templates. You define them in the theme and then for each Wordpress page you create, you can select which page template you would like to use for the page. This sounds like what you're trying to accomplish.

Resources