Magento – Create your own CSS, the standard CSS overruled

Verwendet man ein bestehendes (Standard-)Template wie z.B. das RWD Theme und möchte dies nach seinen eigenen CSS-Vorstellungen anpassen, müsste man eigentlich die styles.css nehmen und alles anpassen was man geändert haben will.

Möchte man aber nichts / so wenig wie möglich an der styles.css arbeiten, e.g. by. zukünftig seine Änderungen besser sehen zu können, kann man auch eine eigene CSS-Datei erstellen und diese in das Theme mit einbinden. Dies ist ansich relativ einfach.

Man öffnet die local.xml im Theme (oder erstellt sie) aus dem Ordner app/design/frontend/[Eigenes Theme]/[Eigenes Theme]/layout und fügt folgenden Code ein

Nun erstellt man natürlich noch eine eigene CSS-Datei mit dem gewünschen Namen im Verzeichnis skin/frontend/[Eigenes Theme]/[Eigenes Theme]/css

Anschließend werden die CSS-Anpassungen im Theme übernommen.

Nun gibt es aber das Problem, dass die Standard-CSS-Dateien wie die styles.css vom System als vorrangig vor der eigenen CSS angesehen werden. Dies ist kein Problem wenn man eine Anpassung macht, die bislang nicht von einer CSS-Datei angesprochen wird. Möchte man aber eine schon vorhandene Definition z.B. aus der styles.css überstimmen, funktioniert dies so nicht.

Wie Simon Sprankel in seinem Blog-Beitrag (HERE) declared, this is because, dass Magento die CSS-Dateien bevorzugt, die eine Bedingung enthalten.
Die anderen CSS-Dateien werden z.B. in der page.xml mit einer Bedingung wie

geladen.

Um also die eigene CSS zu priorisieren, muss man ebenfalls eine Bedingung hinterlegen – auch wenn in dieser nichts steht.

Der Code in der local.xml (if this e.g.. nur diese eine Sache beinhaltet) lautet dann

Damit werden dann die meisten CSS-Definitionen der Standard-CSS-Dateien von der eigenen CSS überstimmt. Ansonsten hilft immer mal wieder ein “!important” hinter der Definition.

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in Magento Design | Leave a comment

Magento – Welcome – Message on CMS page / Show in CMS block

The standard "Welcome" message from Magento is known for a long time. It is usually displayed at the top in the header and often disappears again.

Picture

but you do not want this "welcome" message in the header but at a desired location e.g.. have on the home page, is this not so easy but-if you know how- but rel. quickly.

  1. If you create a file e.g.. named "welcome-cms.phtml" in the folder app / design / frontend /[Eigenes Theme]/[Eigenes Theme]/template/page/html
  2. Here you copied purely following code:
  3. Saving, Upload. With this code, the default welcome text appears a non-logged-in visitors now, the man> Configuration> Design> "Visible head area" in the backend under System - can enter "greeting". If the user is logged but, is his "Welcome, [his name]"appears. This can now be adjusted directly in the file or about the translation. This was with us in the page.csv be found in app / locale / en_US and there as "Welcome, %out s ".
  4. Now in the desired CMS page, the variable

    inserted.
  5. Last must now (Magento> = 1.9) the authorization are set for the block. This is done by> Permissions> block to make a new entry under System and "page / html" allowed.
  6. Now, in the front end, the welcome message should appear beautiful. It can now be mockup directly from the admin or via the CSS with the class ".welcome-cms"

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in General | Tagged | Leave a comment

Magento – M2E error when saving a product in the backend

We just got an error message, that occurs when you save a product in the Magento backend. Oddly, not all products, but only for a specific product.

Once you click on "Save" comes

Fatal error: Call to a member function getOptions() on boolean in /app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product.php on line 308

(the line can obviously vary).

This has to do with a database problem and can be corrected as follows (backup database!).

e.g.. log in via phpMyAdmin into the database and run the following SQL command:

Then worked with us to save the products / the product again without problems.

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in General problems Magento | Leave a comment

Magento – Change the URL of the Contact Us page of contacts

By default, Magento will accommodate the contact page on the URL / contacts. If you want to change this, however - for example, because it is through the URL zugespamt, this can be done with a small adjustment.

We once cast this adaptation into a finished small extension and attached here (download HERE). The URL must now simply the app code local Commercers Contacts etc config.xml be opened to change to a desired URL and then there in row 14 at the desired address to be entered is at the current "contact-us". As an example,

In this case, the contact page would then www.domain.de/ihre-kontaktseite reachable.

Do not forget possible links e.g.. to consider in the footer, whether this be changed automatically or need to be manually.

A file, die man mglw. must edit is then the contacts.xml in the layout directory of the theme used.

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in Magento Extensions | Leave a comment

Magento – SSH Database Import – Problem ERROR 1031 (HY000) at line 2623: Table storage engine for ‘catalog_product_relation’ doesn’t have this option

Picture

We have just tried a database dump via SSH (Putty) to play to a new server and received the error: “ERROR 1031 (HY000) at line 2623: Table storage engine for ‘catalog_product_relation’ doesn’t have this option“.

This seems to regard a problem. to be MySQL, if previously an update has been made. We helped the SQL file with a simple text editor (e.g.. PSPad) to open and then locate the "Find and Replace" function following text:

Picture”�� ROW_FORMAT=FIXED;”�� (including. Spaces and excl. “”). This text then replace ";”�� (only one ; no spaces or "").

Then import the SQL file again via SSH-Import. Now it should work without problems.

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in Software | Leave a comment

Magento – Forward Undeclared customers directly to the login page

If you want to e.g.. a B2B shop up at the log, the user only once / or. must register, to products and / To view or Categories, you can rely on different Extensions. A very common extension is Groups Catalog 2 of power workers.

With this extension, it is possible only to logged in or even just specific customer groups display products and categories and hide individual products for specific groups. So a great extension.

Only at the beginning we had a little action: If the customer comes to the store page / Landing Page he will not be forwarded directly to the login page, but on the backend under "Web" page defined. Here you can indeed login page deposit but this would mean, that the customer now every time, if he wants to "Home" -so clicking on the logo- would land on the login page.

As we do this but do not want, we resort to a little trick. To this end, we have created a new file. This is called "forced-login.phtml" and located in the folder app / design / frontend /[Ihr Template]/[Ihr Template]n/template/customer.

This file is the following code:

Now this file is or. incorporated into the home page CMS by simply opens the home in the back and there the following line in the default text-area inserts function:

Now the system checks, whether the user is logged in. Is it not this, it is passed directly to the login page or he can look at the home page as normal.

Clear are Google & Co. Now get problems, but since you -As in o.g. Solution- the products and categories eh hidden, should the search engines can not find anything on the page. This could also be an appropriate robots.txt entry make clear.

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in General | Leave a comment

Magento 1.9 – Send orders mails immediately rather than cron

Ab Magento Version 1.9 the order confirmation emails are sent not by Event (So after a successful order) but a mail queue, which is triggered via the cron. In many cases, the order confirmation is therefore only all 15 sent minutes.

not really optimal is just with the order confirmation, because the customer expects this after ordering, to be sure, that has really worked out everything. With invoice mails or shipping confirmations contrast, it's probably not as bad, if they were sent a few minutes later. However, these are still sent by Event - ie directly.

For people who would like to, that the order confirmation will be sent directly after ordering, can retrofit this relatively straightforward.

Hierzu kopiert man die Datei app/code/core/Mage/Sales/Model/Order.php in den Ordner app/code/local/Mage/Sales/Model/Order.php

und sucht dort nach der Zeile

This is commented out or deleted and replaced by this line

Subsequently, then the app / design / frontend /[IhrTemplate]/[IhrTemplate]/template / checkout / open success.phtml and top yet ago closing the ?integrated> following code:

Then eventually clear the cache again. Now the mails coming but directly after ordering.

Update vom 17.02.2017

It struck, that repeatedly order confirmation emails were sent twice. To fix this, changing the success.phtml was undone (s.o.). So if the problem of duplicate email shipment emerge, then remove this adjustment again and change only the order.php.

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in General problems Magento | Tagged | Leave a comment

Magento – Compare products not working

This as a side note,: We have just converted to a RWD template displaying Vergleichsbox from right to left and then had the problem, that while "said" was, that the product was successfully added to Compare, However, he has not been displayed.

This was all the more comical, as it in 1:1 Testshop worked perfectly.

The solution was: Reload Index. After recharging all indexes the problem was fixed and the products were displayed in the Compare.

Used in Magento Version 1.8 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
Posted in General problems Magento | Leave a comment