Dieses Blog durchsuchen

Donnerstag, 19. Mai 2016

Mal was anderes !

Deine Gefühle werden dein Schicksal

Achte auf deine Gefühle, denn sie werden zu Gedanken.
Achte auf deine Gedanken, denn sie werden zu Worten.
Achte auf deine Worte, denn sie werden zu Handlungen.
Achte auf deine Handlungen, denn sie werden zu Gewohnheiten.
Achte auf deine Gewohnheiten, denn sie werden dein Charakter. Achte auf deinen Charakter, denn er wird dein Schicksal.

Dienstag, 10. Mai 2016

Create a magento 1 api user programmaticly

If you want to add a user via method you can use the following code

1) the main function in a class Ibrams/Application/Model/User.php

2) the call

Dienstag, 26. April 2016

securty warning from magento

security Announcement Third-Party Themes and Extensions Are at Risk We recently learned that an SQL injection vulnerability has been found in several third-party themes and extensions. Extensions with the vulnerability include: EM (Extreme Magento) Ajaxcart EM (Extreme Magento) Quickshop MD Quickview SmartWave QuickView These extensions are used in several different themes, including Porto, Trego, and Kallyas from SmartWave. Other SmartWave themes may also be at risk. Vulnerable EM modules are used in some EM themes. The core Magento application is not impacted in any way by this vulnerability. We’ve received reports that the SQL injection vulnerability is potentially being exploited. If you currently use these extensions or themes, you should immediately contact the company from which you purchased the extensions or themes to request updated code. We understand that Themeforest, part of Envato Market, has already removed the vulnerability from the Porto theme, but the status of other themes and extensions is unknown. It is also important for you to evaluate all your Magento administrator accounts to make sure there are no unknown users and to reset all your administrator passwords. Please review the Magento Security Best Practices for more information on how to secure your site and use magereport.com to scan your site for missing patches or known issues. This update is part of our ongoing commitment to advise our merchants on security issues as we become aware of them. We thank you for your attention to this matter. Best regards, The Magento Team

Samstag, 16. April 2016

Magento 1. Add custom Textfield with dynamic content in system.xml

If you want to add a custom textfield with dynamic content instead of static content from config.xml you can simply add your own data form element like this

place following class under
app\code\local\Varien\Data\Form\Element\YourCustomTextElement.php



At next you can use your custom form element in system.xml of your module like this. Place your new configvariable in your target field group

Sonntag, 14. Februar 2016

Setup Magento with Vagrant and Puppet as a local enviroment

You will say. Not yet another Vagrant Puppet Magento tutorial.
But I want to share my experience in that context with you.

After 3 Weeks playing arround with Vagrant and Puppet and hours of horrible config-hells in puppet I got my lokal dev enviroment smootly running.

Here is the result:
Lets bring it up running.

At first you need Virtualbox and Vagrant + Hostmanagerplugin

VirtualBox
https://www.virtualbox.org/

Vagrant
https://www.vagrantup.com/downloads.html
  
Vagrant Hostmanager Plugin
https://github.com/smdahlen/vagrant-hostmanager

I don't explain this 3 components here, that is a little bit off topic.


Lets start

1) Checkout the project:

$ git clone https://github.com/pboethig/vagrant_puppet_magento

$ cd vagrant_puppet_magento

$ vagrant up

After that the shop is running

surf to magento.dev

Thats it

Look into the console or read the readme for logindata

add a phpscript to .bashrc as an alias reboot save

Sometimes you want to add a phpscript to your linux enviroment, so that you can do something fancy on your shell console or even in a shell / bash script like:
ini-config -p all -a fancyparameter 

 The most common way to call a php script on the console is

/usr/bin/php /ugly/long/path/to/your/script.php -p all -a fancyparameter 

Noone wants to rember this path all the time.

The community tells me to put an alias in the ./bashrc. But that wont work, if you want to use your php script as a cmdtool in a shellscript without putting the path to the script in an echo like that:

echo "php /path/to/your/long/ugly/network/php/script.php -a all -p parameter"

You have to do some more.

The shellscripts become ugly and unmaintainable.
To get your phpscripts running as an alias cmdtool  you can just add an exportfunction to your ~/.bash_profile or ~/.bashrc and export this function instead of defining an alias, wich is deprecated, as I know.


now you can simlpy enter

fancyscript -p parametername

on your console.

The function in the ./bashrc is rebootsave, so, that you can use it after rebooting the whole wide world.




Montag, 1. Februar 2016

Vagrant 1.8.0 and 1.8.1 throws error on rsync folders

In version 1.8.01.8.1 a rsync error occures.

There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /cygdrive/c/ibrams/webroot/merck.magento.current/magento/html/
Guest path: /home/vagrant/www
Command: rsync -avzO --delete --chmod=Dug=rwx,o=rx,Fug=rw,o=r --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o ControlMaster=auto -o ControlPath=C:/cygwin/tmp/ssh.348 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/ibrams/webroot/merck.magento.current/magento/.vagrant/machines/default/virtualbox/private_key' --exclude .vagrant/ --exclude .git/ --exclude /media/ --exclude /var/ --exclude app/etc/local.xml /cygdrive/c/ibrams/webroot/merck.magento.current/magento/html/ vagrant@127.0.0.1:/home/vagrant/www
Error: Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
mm_receive_fd: no message header
process_mux_new_session: failed to receive fd 0 from slave
mux_client_request_session: read from master failed: Connection reset by peer
Failed to connect to new control master
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]

To fix that you have to patch your vagrant installation manualy.
This fix is for vagrant 1.8.0 and 1.8.1
vagrant -version shows you version
This is the fix:
Edit $VAGRANT_HOME\embedded\gems\gems\vagrant-1.8.0\plugins\synced_folders\rsync\helper.rb

Remove the following codes (line 77~79):


"-o ControlMaster=auto " +
"-o ControlPath=#{controlpath} " +
"-o ControlPersist=10m " +


at next you can run "vagrant reload" and the error is solved