Skip to content

Instantly share code, notes, and snippets.

ProudCommerce proudcommerce

Block or report user

Report or block proudcommerce

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@proudcommerce
proudcommerce / OXID eShop - MySQL Snippets
Last active May 18, 2017
collection of useful and important mysql snippets for the oxid eshop
View OXID eShop - MySQL Snippets
/*** ARTIKEL / ARTICLES ***/
/******************************************************/
/* artikelnamen aller artikel anzeigen, welcher einer bestimmten kategorie zugeordnet sind [proudcommerce.com] */
select oxarticles.oxtitle, oxarticles.OXVARSELECT as Variant, oxcategories.OXTITLE as Kategorie from oxarticles left join oxobject2category on oxarticles.OXID = oxobject2category.OXOBJECTID left join oxcategories on oxcategories.OXID = oxobject2category.OXCATNID where oxcategories.OXROOTID = '<YOUR-CATEGORY-OXID>';
/* variantenpreise (oxvarmin, oxvarmax) anhand der aktuellen artikel aktualisieren [foxido.de] */
UPDATE oxarticles B, (SELECT oxparentid,MIN( oxprice ) AS min ,MAX( oxprice ) AS max FROM oxarticles GROUP BY oxparentid) AS A SET oxvarminprice = A.min, oxvarmaxprice = A.max WHERE B.oxid = A.oxparentid
@proudcommerce
proudcommerce / OXID eShop - check if column exists
Created Jan 8, 2015
this function checks if a given column in a given database table exists. thanks to tim from shoptimax for this snippet.
View OXID eShop - check if column exists
protected function _dbColumnExist($sTable, $sColumn)
{
$sDbName = oxRegistry::getConfig()->getConfigParam('dbName');
$sSql = sprintf("SELECT 1 FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s' "
. " AND COLUMN_NAME = '%s'",
$sDbName, $sTable, $sColumn);
return oxDb::getDb()->getOne($sSql);
}
@proudcommerce
proudcommerce / OXID eShop - gets first subcategory and redirect to this
Last active Aug 29, 2015
gets first subcategory of a main category and redirect to this.uses an array, which main categories should be checked.
View OXID eShop - gets first subcategory and redirect to this
<?php
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @copyright (c) Proud Sourcing GmbH | 2014
* @link https://gist.github.com/proudcommerce
* @link http://www.proudcommerce.com
@proudcommerce
proudcommerce / OXID eShop - Redirect old seo urls
Created Dec 25, 2013
Script for saving old seo urls. Redirects old seo urls (e. g. from an other shop software after relaunch) to the new oxid shop seo urls.
View OXID eShop - Redirect old seo urls
<?php
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @copyright (c) Proud Sourcing GmbH | 2013
* @link https://gist.github.com/proudcommerce
* @version 1.0.0
You can’t perform that action at this time.