dbXapp 2.0
RAD, CMS, Module und Runtime-IDE fuer dbXapp
Loading...
Searching...
No Matches
dbx\dbxShop\dbxShopRepository Class Reference

Public Member Functions

 install ()
 seedDemoProducts ()
 attributeDefinitionsForGroup (int $groupId, bool $activeOnly=true)
 attributeDefinitionsForProduct (int $productId, bool $activeOnly=true)
 attributesForProduct (int $productId)
 allAttributeDefinitions ()
 attributeFilterDefinitions ()
 saveAttributeDefinition (array $data)
 saveProductAttributeValue (int $productId, int $attributeId, string $value)
 saveProductAttributeValues (int $productId, array $values)
 products (bool $activeOnly=true)
 productBySku (string $sku, bool $activeOnly=true)
 productById (int $id)
 groupById (int $id)
 stockIssuesForItems (array $items)
 deleteProducts (array $ids)
 addChannelToProducts (array $ids, string $channelKey)
 removeChannelFromProducts (array $ids, string $channelKey)
 setProductGroupForProducts (array $ids, int $groupId)
 groupsForProduct (int $productId)
 channelsForProduct (int $productId)
 productChannelOverrides (int $productId)
 inheritedChannelsForProduct (int $productId)
 saveProductChannelOverrides (int $productId, array $activeChannelKeys)
 shippingGroupsForProduct (int $productId)
 channelGroupsForProduct (int $productId)
 groups ()
 groupsByParent (int $parentId=0, bool $activeOnly=true)
 groupPath (int $groupId)
 moveProductGroupParent (int $groupId, int $parentId)
 channels ()
 channelById (int $id)
 channelByKey (string $key)
 updateChannel (int $id, array $data)
 deleteChannel (int $id)
 testChannelConnection (int $id)
 productChannelMapping (int $productId, string $channelKey)
 saveProductChannelMapping (int $productId, string $channelKey, array $data)
 exportProductToChannel (int $productId, string $channelKey)
 exportProductsToChannel (array $ids, string $channelKey)
 shippingGroups ()
 channelGroups ()
 channelsForChannelGroup (int $channelGroupId)
 updateProductGroup (int $id, array $data)
 updateShippingGroup (int $id, array $data)
 updateChannelGroup (int $id, array $data, array $channelKeys)
 deleteChannelGroup (int $id)
 deleteProductGroup (int $id)
 deleteShippingGroup (int $id)
 imagesForProduct (int $productId, array $groups=array())
 productImageCounts ()
 allImages ()
 updateImageMediaReference (int $imageId, int $mediaId, string $imagePath='')
 saveImage (int $productId, int $groupId, string $imagePath, string $title, string $alt, int $isPrimary=0, int $sorter=100)
 saveMediaImage (int $productId, int $groupId, int $mediaId, string $title='', string $alt='', int $isPrimary=0, int $sorter=100)
 primaryImageForGroup (int $groupId)
 removeProductImageAssociation (int $imageId, int $productId=0)
 createOrderFromItems (array $items, string $channelKey='shop', string $customerName='', string $customerEmail='', string $note='', string $paymentProvider='', string $paymentStatus='open', string $status='payment_pending', string $customerPhone='', string $shippingAddress='', string $legalSnapshot='', string $withdrawalSnapshot='')
 importChannelOrder (string $channelKey, array $payload)
 orderByNo (string $orderNo)
 orderById (int $id)
 ordersByUid (int $uid, int $limit=25)
 orders (array $filters=array(), int $limit=50, int $offset=0, string $sort='create_date', string $direction='DESC')
 orderCount (array $filters=array())
 orderChannelKeys ()
 updateOrderAdmin (int $id, array $data)
 updateOrderQuickAction (int $id, string $action)
 deleteOrder (int $id)
 orderByPaymentReference (string $provider, string $reference)
 orderItems (int $orderId)
 updateOrderPayment (int $orderId, string $provider, string $status, string $reference='', array $payload=array())
 addOrderHistory (int $orderId, string $eventType, string $oldValue='', string $newValue='', string $message='')
 orderHistory (int $orderId)
 nextInvoiceNo ()
 ensureOrderInvoicePdf (int $id)
 invoicePdfAbsolutePath (array $order)
 saveWithdrawal (array $data)
 updateWithdrawalAdmin (int $id, string $status, string $note='')
 withdrawalById (int $id)
 withdrawals (array $filters=array(), int $limit=50, int $offset=0)
 withdrawalCount (array $filters=array())
 withdrawalsForOrder (int $orderId)
 dashboardStats ()

Detailed Description

Definition at line 4 of file dbxShopRepository.class.php.

Member Function Documentation

◆ addChannelToProducts()

dbx\dbxShop\dbxShopRepository::addChannelToProducts ( array $ids,
string $channelKey )

Definition at line 780 of file dbxShopRepository.class.php.

References install().

◆ addOrderHistory()

dbx\dbxShop\dbxShopRepository::addOrderHistory ( int $orderId,
string $eventType,
string $oldValue = '',
string $newValue = '',
string $message = '' )

Definition at line 2581 of file dbxShopRepository.class.php.

References if.

Referenced by updateOrderPayment().

◆ allAttributeDefinitions()

dbx\dbxShop\dbxShopRepository::allAttributeDefinitions ( )

Definition at line 400 of file dbxShopRepository.class.php.

References groups(), and install().

Referenced by attributeFilterDefinitions().

◆ allImages()

dbx\dbxShop\dbxShopRepository::allImages ( )

Definition at line 1893 of file dbxShopRepository.class.php.

References install().

◆ attributeDefinitionsForGroup()

dbx\dbxShop\dbxShopRepository::attributeDefinitionsForGroup ( int $groupId,
bool $activeOnly = true )

Definition at line 346 of file dbxShopRepository.class.php.

References install().

Referenced by attributeDefinitionsForProduct().

◆ attributeDefinitionsForProduct()

dbx\dbxShop\dbxShopRepository::attributeDefinitionsForProduct ( int $productId,
bool $activeOnly = true )

◆ attributeFilterDefinitions()

dbx\dbxShop\dbxShopRepository::attributeFilterDefinitions ( )

Definition at line 426 of file dbxShopRepository.class.php.

References allAttributeDefinitions(), and install().

◆ attributesForProduct()

dbx\dbxShop\dbxShopRepository::attributesForProduct ( int $productId)

Definition at line 370 of file dbxShopRepository.class.php.

References install().

◆ channelById()

dbx\dbxShop\dbxShopRepository::channelById ( int $id)

Definition at line 1257 of file dbxShopRepository.class.php.

References install().

Referenced by testChannelConnection(), and updateChannel().

◆ channelByKey()

dbx\dbxShop\dbxShopRepository::channelByKey ( string $key)

Definition at line 1266 of file dbxShopRepository.class.php.

References install().

Referenced by importChannelOrder(), and saveProductChannelMapping().

◆ channelGroups()

dbx\dbxShop\dbxShopRepository::channelGroups ( )

Definition at line 1587 of file dbxShopRepository.class.php.

References channelsForChannelGroup(), and install().

◆ channelGroupsForProduct()

dbx\dbxShop\dbxShopRepository::channelGroupsForProduct ( int $productId)

Definition at line 1120 of file dbxShopRepository.class.php.

◆ channels()

dbx\dbxShop\dbxShopRepository::channels ( )

◆ channelsForChannelGroup()

dbx\dbxShop\dbxShopRepository::channelsForChannelGroup ( int $channelGroupId)

Definition at line 1598 of file dbxShopRepository.class.php.

References channels().

Referenced by channelGroups().

◆ channelsForProduct()

dbx\dbxShop\dbxShopRepository::channelsForProduct ( int $productId)

Definition at line 895 of file dbxShopRepository.class.php.

References channels().

◆ createOrderFromItems()

dbx\dbxShop\dbxShopRepository::createOrderFromItems ( array $items,
string $channelKey = 'shop',
string $customerName = '',
string $customerEmail = '',
string $note = '',
string $paymentProvider = '',
string $paymentStatus = 'open',
string $status = 'payment_pending',
string $customerPhone = '',
string $shippingAddress = '',
string $legalSnapshot = '',
string $withdrawalSnapshot = '' )

Definition at line 2049 of file dbxShopRepository.class.php.

References install().

◆ dashboardStats()

dbx\dbxShop\dbxShopRepository::dashboardStats ( )

Definition at line 2880 of file dbxShopRepository.class.php.

References install().

◆ deleteChannel()

dbx\dbxShop\dbxShopRepository::deleteChannel ( int $id)

Definition at line 1324 of file dbxShopRepository.class.php.

References install().

◆ deleteChannelGroup()

dbx\dbxShop\dbxShopRepository::deleteChannelGroup ( int $id)

Definition at line 1734 of file dbxShopRepository.class.php.

References install().

◆ deleteOrder()

dbx\dbxShop\dbxShopRepository::deleteOrder ( int $id)

Definition at line 2543 of file dbxShopRepository.class.php.

References install().

◆ deleteProductGroup()

dbx\dbxShop\dbxShopRepository::deleteProductGroup ( int $id)

Definition at line 1754 of file dbxShopRepository.class.php.

References install().

◆ deleteProducts()

dbx\dbxShop\dbxShopRepository::deleteProducts ( array $ids)

Definition at line 759 of file dbxShopRepository.class.php.

References install().

◆ deleteShippingGroup()

dbx\dbxShop\dbxShopRepository::deleteShippingGroup ( int $id)

Definition at line 1768 of file dbxShopRepository.class.php.

References install().

◆ ensureOrderInvoicePdf()

dbx\dbxShop\dbxShopRepository::ensureOrderInvoicePdf ( int $id)

Definition at line 2716 of file dbxShopRepository.class.php.

References install(), and orderById().

◆ exportProductsToChannel()

dbx\dbxShop\dbxShopRepository::exportProductsToChannel ( array $ids,
string $channelKey )

Definition at line 1547 of file dbxShopRepository.class.php.

References $result, exportProductToChannel(), and install().

◆ exportProductToChannel()

dbx\dbxShop\dbxShopRepository::exportProductToChannel ( int $productId,
string $channelKey )

Definition at line 1520 of file dbxShopRepository.class.php.

References install(), and productById().

Referenced by exportProductsToChannel().

◆ groupById()

dbx\dbxShop\dbxShopRepository::groupById ( int $id)

Definition at line 608 of file dbxShopRepository.class.php.

References install().

Referenced by groupPath(), groupsForProduct(), and moveProductGroupParent().

◆ groupPath()

dbx\dbxShop\dbxShopRepository::groupPath ( int $groupId)

Definition at line 1169 of file dbxShopRepository.class.php.

References groupById(), and install().

◆ groups()

dbx\dbxShop\dbxShopRepository::groups ( )

Definition at line 1153 of file dbxShopRepository.class.php.

References install().

Referenced by allAttributeDefinitions().

◆ groupsByParent()

dbx\dbxShop\dbxShopRepository::groupsByParent ( int $parentId = 0,
bool $activeOnly = true )

Definition at line 1159 of file dbxShopRepository.class.php.

References install().

◆ groupsForProduct()

dbx\dbxShop\dbxShopRepository::groupsForProduct ( int $productId)

Definition at line 852 of file dbxShopRepository.class.php.

References groupById().

Referenced by attributeDefinitionsForProduct(), and productImageCounts().

◆ imagesForProduct()

dbx\dbxShop\dbxShopRepository::imagesForProduct ( int $productId,
array $groups = array() )

Definition at line 1829 of file dbxShopRepository.class.php.

References install().

Referenced by productImageCounts().

◆ importChannelOrder()

dbx\dbxShop\dbxShopRepository::importChannelOrder ( string $channelKey,
array $payload )

Definition at line 2151 of file dbxShopRepository.class.php.

References channelByKey(), and install().

◆ inheritedChannelsForProduct()

dbx\dbxShop\dbxShopRepository::inheritedChannelsForProduct ( int $productId)

Definition at line 980 of file dbxShopRepository.class.php.

References channels(), and install().

◆ install()

dbx\dbxShop\dbxShopRepository::install ( )

◆ invoicePdfAbsolutePath()

dbx\dbxShop\dbxShopRepository::invoicePdfAbsolutePath ( array $order)

Definition at line 2769 of file dbxShopRepository.class.php.

◆ moveProductGroupParent()

dbx\dbxShop\dbxShopRepository::moveProductGroupParent ( int $groupId,
int $parentId )

Definition at line 1225 of file dbxShopRepository.class.php.

References groupById(), and install().

◆ nextInvoiceNo()

dbx\dbxShop\dbxShopRepository::nextInvoiceNo ( )

Definition at line 2608 of file dbxShopRepository.class.php.

Referenced by updateOrderAdmin().

◆ orderById()

dbx\dbxShop\dbxShopRepository::orderById ( int $id)

◆ orderByNo()

dbx\dbxShop\dbxShopRepository::orderByNo ( string $orderNo)

Definition at line 2282 of file dbxShopRepository.class.php.

References install(), orderHistory(), orderItems(), and withdrawalsForOrder().

Referenced by saveWithdrawal().

◆ orderByPaymentReference()

dbx\dbxShop\dbxShopRepository::orderByPaymentReference ( string $provider,
string $reference )

Definition at line 2548 of file dbxShopRepository.class.php.

References install(), and orderItems().

◆ orderChannelKeys()

dbx\dbxShop\dbxShopRepository::orderChannelKeys ( )

Definition at line 2367 of file dbxShopRepository.class.php.

References install().

◆ orderCount()

dbx\dbxShop\dbxShopRepository::orderCount ( array $filters = array())

Definition at line 2350 of file dbxShopRepository.class.php.

References install().

◆ orderHistory()

dbx\dbxShop\dbxShopRepository::orderHistory ( int $orderId)

Definition at line 2603 of file dbxShopRepository.class.php.

Referenced by orderById(), and orderByNo().

◆ orderItems()

dbx\dbxShop\dbxShopRepository::orderItems ( int $orderId)

Definition at line 2556 of file dbxShopRepository.class.php.

Referenced by orderById(), orderByNo(), and orderByPaymentReference().

◆ orders()

dbx\dbxShop\dbxShopRepository::orders ( array $filters = array(),
int $limit = 50,
int $offset = 0,
string $sort = 'create_date',
string $direction = 'DESC' )

Definition at line 2319 of file dbxShopRepository.class.php.

References install().

◆ ordersByUid()

dbx\dbxShop\dbxShopRepository::ordersByUid ( int $uid,
int $limit = 25 )

Definition at line 2302 of file dbxShopRepository.class.php.

References install().

◆ primaryImageForGroup()

dbx\dbxShop\dbxShopRepository::primaryImageForGroup ( int $groupId)

Definition at line 1999 of file dbxShopRepository.class.php.

References install().

◆ productById()

dbx\dbxShop\dbxShopRepository::productById ( int $id)

◆ productBySku()

dbx\dbxShop\dbxShopRepository::productBySku ( string $sku,
bool $activeOnly = true )

Definition at line 592 of file dbxShopRepository.class.php.

References install().

Referenced by stockIssuesForItems().

◆ productChannelMapping()

dbx\dbxShop\dbxShopRepository::productChannelMapping ( int $productId,
string $channelKey )

Definition at line 1417 of file dbxShopRepository.class.php.

References install(), and productById().

◆ productChannelOverrides()

dbx\dbxShop\dbxShopRepository::productChannelOverrides ( int $productId)

Definition at line 953 of file dbxShopRepository.class.php.

References channels(), and install().

◆ productImageCounts()

dbx\dbxShop\dbxShopRepository::productImageCounts ( )

Definition at line 1880 of file dbxShopRepository.class.php.

References groupsForProduct(), imagesForProduct(), and install().

◆ products()

dbx\dbxShop\dbxShopRepository::products ( bool $activeOnly = true)

Definition at line 584 of file dbxShopRepository.class.php.

References install().

◆ removeChannelFromProducts()

dbx\dbxShop\dbxShopRepository::removeChannelFromProducts ( array $ids,
string $channelKey )

Definition at line 804 of file dbxShopRepository.class.php.

References install().

◆ removeProductImageAssociation()

dbx\dbxShop\dbxShopRepository::removeProductImageAssociation ( int $imageId,
int $productId = 0 )

Definition at line 2019 of file dbxShopRepository.class.php.

References install().

◆ saveAttributeDefinition()

dbx\dbxShop\dbxShopRepository::saveAttributeDefinition ( array $data)

Definition at line 470 of file dbxShopRepository.class.php.

References install().

◆ saveImage()

dbx\dbxShop\dbxShopRepository::saveImage ( int $productId,
int $groupId,
string $imagePath,
string $title,
string $alt,
int $isPrimary = 0,
int $sorter = 100 )

Definition at line 1930 of file dbxShopRepository.class.php.

References install().

◆ saveMediaImage()

dbx\dbxShop\dbxShopRepository::saveMediaImage ( int $productId,
int $groupId,
int $mediaId,
string $title = '',
string $alt = '',
int $isPrimary = 0,
int $sorter = 100 )

Definition at line 1959 of file dbxShopRepository.class.php.

References install().

◆ saveProductAttributeValue()

dbx\dbxShop\dbxShopRepository::saveProductAttributeValue ( int $productId,
int $attributeId,
string $value )

Definition at line 508 of file dbxShopRepository.class.php.

References install().

Referenced by saveProductAttributeValues().

◆ saveProductAttributeValues()

dbx\dbxShop\dbxShopRepository::saveProductAttributeValues ( int $productId,
array $values )

Definition at line 529 of file dbxShopRepository.class.php.

References foreach, and saveProductAttributeValue().

◆ saveProductChannelMapping()

dbx\dbxShop\dbxShopRepository::saveProductChannelMapping ( int $productId,
string $channelKey,
array $data )

Definition at line 1457 of file dbxShopRepository.class.php.

References channelByKey(), install(), and productById().

◆ saveProductChannelOverrides()

dbx\dbxShop\dbxShopRepository::saveProductChannelOverrides ( int $productId,
array $activeChannelKeys )

Definition at line 1027 of file dbxShopRepository.class.php.

References install().

◆ saveWithdrawal()

dbx\dbxShop\dbxShopRepository::saveWithdrawal ( array $data)

Definition at line 2779 of file dbxShopRepository.class.php.

References install(), and orderByNo().

◆ seedDemoProducts()

dbx\dbxShop\dbxShopRepository::seedDemoProducts ( )

Definition at line 320 of file dbxShopRepository.class.php.

References install().

◆ setProductGroupForProducts()

dbx\dbxShop\dbxShopRepository::setProductGroupForProducts ( array $ids,
int $groupId )

Definition at line 828 of file dbxShopRepository.class.php.

References install().

◆ shippingGroups()

dbx\dbxShop\dbxShopRepository::shippingGroups ( )

Definition at line 1581 of file dbxShopRepository.class.php.

References install().

◆ shippingGroupsForProduct()

dbx\dbxShop\dbxShopRepository::shippingGroupsForProduct ( int $productId)

Definition at line 1087 of file dbxShopRepository.class.php.

◆ stockIssuesForItems()

dbx\dbxShop\dbxShopRepository::stockIssuesForItems ( array $items)

Definition at line 630 of file dbxShopRepository.class.php.

References install(), and productBySku().

◆ testChannelConnection()

dbx\dbxShop\dbxShopRepository::testChannelConnection ( int $id)

Definition at line 1354 of file dbxShopRepository.class.php.

References channelById(), and install().

◆ updateChannel()

dbx\dbxShop\dbxShopRepository::updateChannel ( int $id,
array $data )

Definition at line 1276 of file dbxShopRepository.class.php.

References $field, channelById(), and install().

◆ updateChannelGroup()

dbx\dbxShop\dbxShopRepository::updateChannelGroup ( int $id,
array $data,
array $channelKeys )

Definition at line 1691 of file dbxShopRepository.class.php.

References install().

◆ updateImageMediaReference()

dbx\dbxShop\dbxShopRepository::updateImageMediaReference ( int $imageId,
int $mediaId,
string $imagePath = '' )

Definition at line 1909 of file dbxShopRepository.class.php.

References install().

◆ updateOrderAdmin()

dbx\dbxShop\dbxShopRepository::updateOrderAdmin ( int $id,
array $data )

Definition at line 2381 of file dbxShopRepository.class.php.

References install(), nextInvoiceNo(), and orderById().

◆ updateOrderPayment()

dbx\dbxShop\dbxShopRepository::updateOrderPayment ( int $orderId,
string $provider,
string $status,
string $reference = '',
array $payload = array() )

Definition at line 2561 of file dbxShopRepository.class.php.

References addOrderHistory(), install(), and orderById().

◆ updateOrderQuickAction()

dbx\dbxShop\dbxShopRepository::updateOrderQuickAction ( int $id,
string $action )

Definition at line 2468 of file dbxShopRepository.class.php.

References install(), and orderById().

◆ updateProductGroup()

dbx\dbxShop\dbxShopRepository::updateProductGroup ( int $id,
array $data )

Definition at line 1620 of file dbxShopRepository.class.php.

References install().

◆ updateShippingGroup()

dbx\dbxShop\dbxShopRepository::updateShippingGroup ( int $id,
array $data )

Definition at line 1664 of file dbxShopRepository.class.php.

References install().

◆ updateWithdrawalAdmin()

dbx\dbxShop\dbxShopRepository::updateWithdrawalAdmin ( int $id,
string $status,
string $note = '' )

Definition at line 2803 of file dbxShopRepository.class.php.

References install().

◆ withdrawalById()

dbx\dbxShop\dbxShopRepository::withdrawalById ( int $id)

Definition at line 2837 of file dbxShopRepository.class.php.

◆ withdrawalCount()

dbx\dbxShop\dbxShopRepository::withdrawalCount ( array $filters = array())

Definition at line 2858 of file dbxShopRepository.class.php.

◆ withdrawals()

dbx\dbxShop\dbxShopRepository::withdrawals ( array $filters = array(),
int $limit = 50,
int $offset = 0 )

Definition at line 2842 of file dbxShopRepository.class.php.

References install().

◆ withdrawalsForOrder()

dbx\dbxShop\dbxShopRepository::withdrawalsForOrder ( int $orderId)

Definition at line 2872 of file dbxShopRepository.class.php.

References if.

Referenced by orderById(), and orderByNo().


The documentation for this class was generated from the following file: