Permalink
Browse files

Update JCckEcommerceProduct for upcoming SEBLOD eCommerce Add-on

  • Loading branch information...
1 parent 8071cb0 commit 5e415f58410bd4fd5c15a9f6fddd91e7ea8c0601 @sebastienheraud sebastienheraud committed Feb 7, 2017
Showing with 8 additions and 0 deletions.
  1. +8 −0 libraries/cms/cck/ecommerce/product.php
@@ -13,6 +13,12 @@
// JCckEcommerceProduct
abstract class JCckEcommerceProduct
{
+ // getAttributes
+ public static function getAttributes()
+ {
+ return JCckDatabase::loadColumn( 'SELECT storage_field FROM #__cck_core_fields WHERE type = "cck_ecommerce_attribute" AND published = 1' );
+ }
+
// getDefinition (retrieve the primary definition of a Content Type)
public static function getDefinition( $type )
{
@@ -40,6 +46,8 @@ public static function getDefinition( $type )
}
if ( !( isset( $definitions[$type] ) && $definitions[$type] ) ) {
return (object)array(
+ 'attribute'=>0,
+ 'attributes'=>array(),
'name'=>'',
'quantity'=>'',
'request_stock_field'=>'',

0 comments on commit 5e415f5

Please sign in to comment.