Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard V. Rokko11

  • Germany
View GitHub Profile
@Rokko11
Rokko11 / gist:6376918
Created Aug 29, 2013
How to add foreign key from bundle_option to cms_block
View gist:6376918
/** @var $installer Mage_Catalog_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$installer->getConnection()->addColumn($installer->getTable('bundle/option'), 'block_id',
array(
'nullable' => true,
'unsigned' => true,
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
@Rokko11
Rokko11 / openligadb_ruby_rails_example_snippet
Created Aug 10, 2013
Getting Information of OpenLigaDb with Ruby in a Rails project
View openligadb_ruby_rails_example_snippet
# This snippet works with Ruby Gem "Savon"
client = Savon.client(wsdl: "http://www.OpenLigaDB.de/Webservices/Sportsdata.asmx?WSDL")
method = "get_matchdata_by_league_date_time"
message = {from_date_time: 5.hours.ago, to_date_time: Time.now, league_shortcut: 'bl1'}
result = client.call(:"#{method}", message: message)
data_array = result.body[:"#{method}_response"][:"#{method}_result"][:matchdata]
data_array.each do |data|
puts data[:match_id]
end
You can’t perform that action at this time.