Arhiv za kategorijo ‘Magento’

Magento – Move a category programmatically

Introduction

Our client has decided to change some categories path. He wanted to move some sub-category trees to different parent category.
This can be done quite simply in administration, because of drag and drop interface. But because of my own curiosity I started to wonder, what about doing that programmatically? How can this be done?

Preberi ostalo »

Magento – pravice na strežniku – prenos na novo gostovanje

Ste že kdaj prestavljali Magento? Se vam je naredilo, da je na prejšnjem gostovanju vse delovalo, po prenosu pa nič več? Preberi ostalo »

Magento – add attribute to attribute programmaticaly with sql

Sometimes you may need to add attribut to attribute set programmaticaly and not in cms. One of the reasons could be that you have too many products. In such case, adding new attribute to attribute set could fail due too many resources taken.
Preberi ostalo »

Update magento produktov s sql stavki

Če želimo pohitriti izvajanje osvežitev produktov potem je boljše, da izvedemo to s sql stavki. Z njimi lahko osvežimo le atribute katere mi želimo, v tem blogu bom zapisal kako zapisati pravilen update za short in long description.
Preberi ostalo »

Kazala v Magentu (Magento Indexes)

Kaj so Magento kazala oz. indeksi?
Magento svoje podatke zavoljo fleksibilnosti ter razširljivosti shranjuje z uporabo EAV podatkovnega modela, kar pa celotnemu sistemu doda tudi nekaj kompleksnosti. Tako imamo podatke razpršene po večjem številu tabel kot ponavadi. Preberi ostalo »

Magento – Admin 404 error in module settings

When you build a new module, sometimes you also need to provide some settings that are accessible through admin. Quite common problem is 404 error in admin when trying to access module settings.
Preberi ostalo »

Add SQL queries with new Magento extension version

There are times when you need to release new version of already existing extension only with some changes to database. You either add a table, change field type or really just anything which would modify existing database.

Magento has very good support for solving this problem in my opinion. You just need to know a few things and you are ready to do it :) What those are I will try to explain as simple as i can, otherwise leave a comment if anything is not clear.

Preberi ostalo »

Magento – Extending core abstract class

In Magento you can extend core classes within your module. Normally you can do this within config.xml which is part of your module.
Preberi ostalo »

Magento – modify product view without changing the view.phtml

I have came many times into situation when I needed to modify product view without changing the view.phtml file. I was searching for solution how to inject some code by changing layout xml file. Unfortunately, it is not possible in an ordinary way. But there are some tricks.
Preberi ostalo »

Magento – Error in file SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘core_resource’ already exists

Se vam zgodi, da vam včasih Magento pri obisku trgovine javi napako o mysql4 install, kot je razvidno spodaj?


Error:
Error in file: "/home/oskarvel/domains/domena.si/public_html/app/code/core/Mage/Core/sql/core_setup/mysql4-install-0.8.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'core_resource' already exists

Trace:
#0 /home/oskarvel/domains/domena.si/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(390): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/oskarvel/domains/domena.si/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(276): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '0.8.28')
#2 /home/oskarvel/domains/domena.si/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(240): Mage_Core_Model_Resource_Setup->_installResourceDb('0.8.28')
#3 /home/oskarvel/domains/domena.si/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(161): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/oskarvel/domains/domena.si/public_html/app/code/core/Mage/Core/Model/App.php(399): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/oskarvel/domains/domena.si/public_html/app/code/core/Mage/Core/Model/App.php(329): Mage_Core_Model_App->_initModules()
#6 /home/oskarvel/domains/domena.si/public_html/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#7 /home/oskarvel/domains/domena.si/public_html/index.php(85): Mage::run('', 'store')
#8 {main}
Preberi ostalo »