Can I insert a phpBB Forum into a Magento CMS Static Page or Block? - magento

I'm sure there is a much simpler solution for what I am trying to do here, but I am running out of ideas. Essentially I need to create a phpBB forum what exists within my Magento install so that the header and footer from my Magento store are always visible.
The thought is to use a CMS static page for the forum and then style it accordingly. Is there a way to accomplish what I want to do without significant modification? Or, do I just create a one off .phtml file that calls my header, footer and forum? Am I on the right page or am I over/under thinking this?

You'll need to get around Magento's bootstrap (/index.php), because phpBB won't function if Magento is intercepting every URL.
There's also the issue of Magento and phpBB not sharing authentication systems, so users have to log into one, neither, or both. That's not a great UX if you ask me, but solving that problem is a very complicated issue.
Other than that you shouldn't have many problems.

Related

Magento 2 Bundle Product Cache

I'm working on a site developed by a third party, which is Magento 2.1 and uses bundle products heavily. Most of the bundles are made of 260 child products as a choice, and inevitably makes loading the product page for them incredibly slow.
On Mage 1 it was simple enough to use Full Page Caching to cache the bundle product options and speed up the load with pre-caching, but FPC in Mage 2 is clearly very different.
The main slowdown appears to be from the form and options blocks called in the catalog_product_view.xml for the theme, as they iterate over all the child products before rendering the page, so I've tried adding;
cacheable="true"
To those specific blocks, but it's made no difference.
Anyone have any other idea's for how to cache Magento 2 bundle product pages?
EDIT EDIT
I've just tried plugging the database into a fresh install of Magento 2.1 and can see that bundle products are being added to the var/page_cache directory. On the client server, the only thing being written to that directory are tags and header info.
So then new angle... why would Magento 2 not write any FPC html to the page_cache directory? Something higher up the tree has erroneously has cacheable=false set against it perhaps? I'll get digging
Sorry, I cannot comment your last post.
Do you try to use Varnish as the HTTP cache ? Magento recommendation is to use Varnish and Redis as cache backend.
So I found the issue, and it was a mistake made by the people who built the site, and the module creators of magepal magento2-googletagmanager. In both instances, the blocks had;
cacheable="false"
in the layout XML. Setting this on any block on a page will stop the whole page from cacheing. So remove that line, and add;
$this->_isScopePrivate = true;
In to the blocks __construct function. Problem solved.

magento 2 custom phtml page

Having just got myself acquainted (enough) with Magento 1.9, and able to make the customisations required, I've been told that once it's out, we're moving to Magento v2.0.
Having found the differences in the file structure, I believe I can see where to place my code for the custom pages we use, but how can I add this page from my project to a static block for later use?
Previously, the method used was as follows (I realise this may not follow the best practise, but it worked):
Create element folder within theme or core templates directory.
eg. /app/design/frontend/<theme>/default/template/myelement/mypage.phtml
Add this page/element to a static block using the following in the content editor:
{{block type="<theme>/default" template="myelement/mypage.phtml"}}
This block can then be added to the category pages as required.
In Magento 2, I have tried what I believe to be required, which is replicating the file structure and adding phtml files to this, so the template file now resides in:
/app/code/<supplier>/<module>/view/frontend/templates/mypage.phtml
Adding to the content editor the following:
{{block type="<supplier>/<module>" template="mypage.phtml"}}
Unfortunately, this does not display the intended page (element). It doesn't display the calling "{{block" entry either, which usually happens when the line is invalid, so I can only assume that I'm missing something with the link to this template.
If anyone can offer some assistance with this, I would be most grateful.
EDIT:
Continued research on this has led me to the following assumptions:
Magento 2 requires more than just a new .phtml page, even for simple customizations.
I'm still missing something.....
Having gone through 3 different tutorials on creating new modules for Magento 2, each providing slightly different methods, but fundamentally being the same thing, I now have what I believe should be all the code elements to make a new .phtml template for display in a static block.
This has led to an additional problem though.
While I have the required code, I cannot add the module. Adding the module to etc/config.php, as suggested in 2 out of the 3 tutorials, simply crashed M2, both admin and frontend when you try to clear the cache. This is the case after manually clearing cache folders in the var directory.
Also, still unable to add the .phtml template file to a static block or page using content editor.
Not much hair left to pull out here, so looking for help! Thanks in advance
There are a few samples on GitHub, including https://github.com/magento/magento2-samples/tree/master/sample-module-newpage which shows a module adding a new page with a very simple PHTML template file. This example does not use CMS content editing however - it is a sample based on using layout files.
You mentioned you were getting crashes. Would need more details to help on that one. If you got it solved, could you update this question and accept a response to close it out? Thx!
You Should try "class" instead of "type". So your code should look like.
{{block class="<package>\<module>\Block\MyBlock" template="mypage.phtml"}}
You Should try "VenderName_Modulename::myelement/mypage.phtml" instead of "myelement/mypage.phtml". So your code should look like.
{{block class="VenderNameModulename\Block\MyBlock" template="VenderName_Modulename::myelement/mypage.phtml"}}

Joomla extension for people posts with categories

Are there any type of extensions that let people post what they want with categories. So they need to sign-up and sign-in, and then create a new post, then select the relative category that the post will be shown in to other people.
I may need to show posts by geo-localisation restriction, for example, posts appears in just US or UK.
I'm a PHP developer. I can achieve this system, but I wondered if it does already exist some CMS like Joomla doing what I need, to save time. I may also be able to develop such Joomla modules if it's allowed. Please need a push around these requirements since I don't have too much experience with Joomla.
I would recommend you use the article section of joomla which is a built in one. I think the things available in joomla package will suit your category, post and signin and signup requirements.
For geo-localisation restrictions I think your php knowledge is more than enough to change or modify few parts of the code in the joomla. I think this way will help you save some time. I have done these before.They have worked fine for me. Hope this helps you.

Magento Multi Store themes calling same login.phtml file

I'm new to magento. Currently i'm developing two ecommerce sites using multi-store option in magento. Both the sites are 90% over, last night when i planned to customize the login page i was shocked. The reason is the changes made in first store login page also reflecting in second store also. The login page is curently calling from
frontend/default/default/template/persistent/customer/form/login.phtml
Is it possible to give any custom login page? PLz guide me magento experts......
Please update your post with your frontend/ folder structure down to each theme template folder. It might be that you don't have a copy of login.phtml in the second theme. Moreover you should follow templates best practices as:
Always create for a new shop different packaga. So not
frontend/default
but
frontend/yourcustompackage
Always have default theme left as much untouched, as possible. So in the
frontend/package/default
Should be some basic changes and rules of your package. It means for example in the putting reset.css for all of your themes. Or something like this.
As for me, each store view should have own theme. So, for example, storeview1
frontend/package/storeview1/
There you copy and change files specific for this theme. So, for example, in default you might have login.phtml. But you want storeview1 to have another login.phtml and in storeview2 it should be the same as in default. Therefore you copy the login.phtml from default to storeview1 and change it there. Don't forget to change package and theme in System->Configuration->Design. Package should be change for whole shop and theme should be specified for every store view or left untouched for default.
P.S. Magento theme fallbacks
P.P.S. Try this tutorial or google another one
P.P.P.S. I hope, you got the answer for your question.

How to solve 404 not found problem in Magento

I have installed full release Magento on localhost from http://www.magentocommerce.com/download. Before doing installation I have created a database and import Magento sample database (downloaded from Magento site).
After that continue installation process. When I checked fronted its shows Best Selling Products when I clicked any of the product it gives error given below:
Whoops, our bad...
The page you requested was not found, and we have a fine guess why.
* If you typed the URL directly, please make sure the spelling is correct.
* If you clicked on a link to get here, the link is outdated.
What can you do?
Have no fear, help is near! There are many ways you can get back on track with Magento Demo Store.
* Go back to the previous page.
* Use the search bar at the top of the page to search for your products.
* Follow these links to get you back on track!
Store Home
My Account
I am new to Magento.
I've experienced this too. In the admin go to System > Index Management and rebuild the various catalog indexes, especially the URL rewrites.
This is because the sample data doesn't have it's paths stored to begin with, it needs to be calculated, and the Best Selling Products section doesn't read the actual paths in use, instead it is a Static CMS Block with it's HREFs fixed. This will probably never occur for products you enter yourself so it's nothing to worry about.
I had the same problem in Wamp. I had my folder named Magento, renaming it to magento, fixed the problem. (Lower case)
I had a similar issue, I was transferring Magento from a Unix server to a Windows server. My issue was to do with links looking like this (not working)
http://www.magentoshop.com.au/shop/product01.html
instead of
http://www.magentoshop.com.au/shop/index.php/product01.html
Haven't worked out how to fix all links yet, but just adding it tells me where the issue lies. Hope it helps someone else.

Resources