Display Facebook connect module in the header - php

I have installed the "Facebook Connect" extension in Opencart and it works fine, but the customer is asking me to move it on the fixed part below the header that always shows the cart total and content
WELCOME VISITOR YOU CAN LOGIN OR CREATE AN ACCOUNT
Cart: 1 item(s) - €42.3
http://i.imgur.com/VZdlwLi.jpg
So basically she wants that the "facebook connect" button is always visible on all pages.
How can I do that?
Another thing that she would like it to have the "facebook connect" on the login page,in the area for new customer, right near the the continue button
http://i.imgur.com/Uwfygjr.jpg

Opencart, as you know, has only 4 positions for modules to be placed at. So you have 2 options.
One is to create a new position, eg 'top header', but this is too much work for sth as simple as that. Of course you can buy a module that does that but I think it will not do exactly what you want.
Your second option is to edit the header.tpl and the header conrtoller files. Since this is a custom theme, if there are no upgrades planned to the whole theme, I would recommend editing the tpl file directly and adding changes to the controller via vqmod. What you need is to find the code from the facebook connect extension that outputs this blue button (look in a facebook_connect.tpl, or sth similar in the default theme) together with any javascript or css rules and place this code in the appropriate place in the header.tpl of your theme. Then see if there is any code in the facebook connect extension's controller file that is necessary for the button to work. If so, first try to see if you can skip it by adding manually anything you can directly in the tpl file. Eg if there is a setting for a facebook id or sth that is loaded in the controller file just to be output in the tpl file, just put the id directly in the tpl file. The rest of the code just put it in a vqmod file to place it somewhere in the index function of the header controller.

Related

Why Wordpress does not create pages?

I just installed a new theme. I bought the Salutation theme, installed it, ok. But, whenever I create a page through the menu (pages --> add new), and then I try to publish it and visualize it, the page doesn't exist! It shows a 404 error:
The requested URL /public_html/pagename/ was not found on this server.
I also used the import option to import 'static blocks', which are necessary for the theme. The theme comes with a demo, which has another 50 more pages, but all of them give the same error (404 NOT FOUND)!
My guess is that is a problem with a permalink or something like that (I need to use the BuddyPress plugin)....But help me!
Try going to Settings->Permalinks and saving the settings (changing is not necessary). This should flush your permalinks. If that doesn't work, you should look at your .htaccess file and see what is inside it. If it looks dramatically different from these samples: https://codex.wordpress.org/htaccess try to see what is editing it and you will have to deactivate whatever that is.
Every Page you create in wordpress can only be accessed by creating a Menu alias for that page.
Try This
Login to your dashboard
Goto Appearance >> Menu
Look for the page you created and add it to the Site Menu
Save the changes on the Menu
Goto the Main Site, refresh the site and test your menu
Note that: you can also create other types of menu like "Custom Links" (pointing to the Page or external sites). This helps only when you've changed the permalink of the page or when you know the page id

How to make Wordpress Custom page

i m a newbie to wordpress. I have started theme development and encountered these problems. I think these kind of problem does have a solution, but i m not able to find it out.
I m trying to make a custom page. Uptill now i have made header, footer and main index page.
I see that whenever my theme is activated, I see these default index page, with header and footer assign to it.
I have also made some cutom about us , contact us pages using the Add Pages Functionality of wordpress.
My Problem:
1.Now I m trying to make custom product page where I will have more than 100 images on that pages, and then i can change the images, add the images and description and the link url in future. I have made some html code and put it in the text Tab . I can also see the images on the frontend of the Custom page. But my template breaks. Images goes up and description goes far below.
Also i wanted to add fancybox to all the images which are goin to be replaced or added. But again my template breaks.
So can we make custom.php page and do some coding or anything which you feel is the right way of doing it, Please let me know.
Firstly create product.php page in templates folder using below code on top
<?php
/*
Template Name: My Product Page
*/
get_header();
// write your code here
get_footer();
Then, assign the above template to the page in admin.
Then, that page you can call in menu.
For more detail, check here :- http://codex.wordpress.org/Page_Templates
Actually you don't really need to create a custom template for this unless if you are planing to use that same template on another page.
If your page name is products , just create a file called page-products.php in your theme root. and write your code inside that page.
If your planing to develop themes first be comfirtable with wp template hierarchy.
http://codex.wordpress.org/Template_Hierarchy

Unable to Display Products in Magento

Our client is using custom search i.e., Searchperience at present they want to remove the custom search and enable the default magento search. While removing AOE_Searchperience related folders Products are not displaying at all. How can be this solved?
Perhaps you have not removed all the files and there is an XML file that is pointing to a template that doesn't exist.
Are you concerned with the category page or the product page or both?
If everything is displaying on the category page except the products then I suggest you add a quick echo('products would be here'); as the first line of code in the file /app/design/frontend/[your theme or base]/catalog/product/list.phtml
if you can see that string in your shop you know you have identified the correct phtml file and you should check to see if the product collection is populated.
if you do not see the string then you need to work out which list.phtml is being called by Magento. I would search my files for list.phtml but turning on Magento's system->configuration->developer->debug->template path hints (and add block names to hints) will expose which .phtml file is being called and what its block class is - that will help you flesh out if the wrong .phtml file is being used or if it is of the wrong class.
If the correct list.phtml is being called but the product collection is empty then there is something funny going on.
To remedy Magento behaving funny:
log out of the admin area and log back into the admin area
turn compilation off
turn compilation back on
re-index everything
refresh all the Magento caches including the Magento cache and the cache storage
refresh any external caches
try to refresh the page and see if that helped.
If that didn't help, switch to the default Magento theme and repeat the steps above. If the product still aren't there even in the default theme then it suggests there are still some module files getting in the way or maybe the core files have been changed but that would be very odd. Start with the .phtml and the block class (discerned from the debug hints mentioned above and follow the code back until you figure out why the category page has an empty product collection)
If the default Magento theme does display the product then you know your fault is theme specific so turn your theme back on and study the file local.xml very very carefully.

Socialengine - How to add custom module to layout editor

I've made a few modules within my socialengine application however I was wondering how do I add these to the layout editor (root/admin/content) so that I can add widgets to these pages?
You can add the widget in layout editor by adding setting in content.php file.
We recommend adding your widget via the Package Manager which should help take care of the rest. For more information, please see in the Developer SDK section: http://support.socialengine.com/questions/180/Admin-Panel-Manage-Packages-Plugins
You should create a page first from layout editor.DO NOT GIVE any page URL in edit page info section.Leave the page without URL.Most important, add the content widget to your page and save it.
Now, you have a fresh page which does n't have url set.Create a module and either install it or paste it in your application/modules directory. Now, open your database and find the table
"engine4_core_pages" and click on insert and set the name field with your modulename_controller_action.
Comeback to your module and open index controller and put whatever code you want to in index action and just add a simple code to view this in your page,"
$this->_helper->content
// ->setNoRender()
->setEnabled()
You are done.You can set the route from your modules manifest.php inside settings
folder.
Hope this will help.
http://bloffin.blogspot.in/ for more...

override search form template in drupal 7

I want to create my own search form template in my theme. When copy search-result.tpl.php and from the core search module into my theme it is rendered instead of the default (which is what I expected).
However when I copy search-block-form.tpl from the search core into my theme I get nada. In fact when I place a "hello world" token in the search-block-form.tpl in the core search module it doesn't get rendered. To rephrase I need to know in what template file is the form ultimately rendered and how do I change it to the one in my theme.
The search block form is actually not using this template. The solution is to use the Form API in your template.php file and alter the template right there. Here is a link to the solution:
http://drupal.org/node/154137
First of all, are you talking about search form in block or about search form page, which is displayed at sitename.com/search?
Have you flushed all caches after you placed new TPL file with your custom token? Anyway, if you want to debug yourself, try to download and enable devel_themer module (it depends on devel module too). http://drupal.org/project/devel_themer

Categories