This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- -------------------------------------------------------- | |
-- | |
-- Create View in export-DB to get data by customernumber and export it to a tmp table into the import-DB | |
-- | |
-- -------------------------------------------------------- | |
DROP VIEW IF EXISTS `v_user_debit_by_customernumber`; | |
CREATE VIEW `v_user_debit_by_customernumber` AS select `s_user_billingaddress`.`customernumber` AS `customernumber`,`s_user_debit`.`account` AS `account`,`s_user_debit`.`bankcode` AS `bankcode`,`s_user_debit`.`bankname` AS `bankname`,`s_user_debit`.`bankholder` AS `bankholder` from (`s_user_billingaddress` join `s_user_debit`) where (`s_user_billingaddress`.`userID` = `s_user_debit`.`userID`); | |
-- -------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ret = array_map ( | |
function ($_) {return explode (':', $_);}, | |
explode (';', $data) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$d = new DOMDocument; | |
$mock = new DOMDocument; | |
$d->loadHTML(file_get_contents('http://www.telekom-stiftung.de/dts-cms/de/mobile-newsarchiv')); | |
$body = $d->getElementsByTagName('body')->item(0); | |
foreach ($body->childNodes as $child){ | |
$mock->appendChild($mock->importNode($child, true)); | |
} | |
echo $mock->saveHTML(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod 777 config.php | |
chmod 777 -R cache | |
chmod 777 -R files | |
chmod 777 -R media | |
chmod 777 -R engine/Shopware/Plugins/Community | |
chmod 777 -R logs | |
chmod 777 -R engine/Shopware/Plugins/Default | |
chmod 777 -R web/cache/ | |
chmod 777 -R recovery/ | |
chmod 777 -R themes/Frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$zip = new ZipArchive; | |
$res = $zip->open('sw.zip'); | |
if ($res === TRUE) { | |
$zip->extractTo('./'); | |
$zip->close(); | |
echo 'ok'; | |
} else { | |
echo 'failed'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$files = glob("*"); | |
foreach($files as $file){ | |
rrmdir($file); | |
} | |
function rrmdir($dir) | |
{ | |
if (is_dir($dir)) // ensures that we actually have a directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function usortFunction($g1, $g2) { | |
$sortierung = Array("XXXS" => 1, "XXS" => 2, "XS" => 3, "S" => 4, "M" => 5, "L" => 6, "XL" => 7, "XXL" => 8, "XXXL" => 9, "XXXXL" => 10); | |
$index1 = $sortierung[strtoupper($g1)]; | |
$index2 = $sortierung[strtoupper($g2)]; | |
return ($index1 < $index2) ? -1 : 1; | |
} | |
usort($groessen, "usortFunction"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Delete all empty Categories | |
* @return int | |
*/ | |
public function deleteEmptyCategories() | |
{ | |
$acSql = "select * from s_categories | |
left join s_articles_categories_ro ro | |
on ro.categoryID = s_categories.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var sizes = ["XS", "S", "M", "L", "XL", "2XL", "3XL", "4XL"], | |
select = $('.configurator--form select[name="group[2]"]'); | |
$('option', select).sort(function (a, b) { | |
if(isNaN($(a).text().trim())){ | |
return sizes.indexOf($(a).text().trim()) - sizes.indexOf($(b).text().trim()); | |
}else{ | |
return $(a).text() > $(b).text() ? 1 : $(a).text() < $(b).text() ? -1 : 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Creates a new Spreadshirt basket | |
* @param $shop | |
* @param $namespaces | |
* @return array | |
*/ | |
private function createBasket($shop, $namespaces) | |
{ | |
$basket = new \SimpleXmlElement('<basket xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://api.spreadshirt.net"> |
OlderNewer