Hallo zusammen, ich würde gerne für die einzelnen Varianten / Konfigurator-Artikel den Lagerbestand auslesen. Ich habe die articleID zur Verfügung sowie die Konfigurator-Daten wie optionname groupid etc. Ich sehe in der Datenbank keine Relation dazu. Hat jemand eine Idee wie ich das auslesen kann via SQL-Statement, Shopware-Methoden, etc.? Würde mich über Unterstützung freuen. LG Pascal
Ich habe mal kurz eine Mysql-View zusammengestellt .Aber ich weiß natürlich nicht ob hiermit das Problem gelöst ist. 1.)Mit einem Editor kontrollieren auf Shopware-Datenbankname und ggf. abändern. 2.)Per Phpmyadmin View-Import starten. 3.)per Phpmyadmin anschauen und ggf. ändern mfg businessapp //--------------------------------------------- – phpMyAdmin SQL Dump – version 4.0.4.1 – http://www.phpmyadmin.net – -- Host: 127.0.0.1 – Erstellungszeit: 08. Apr 2014 um 16:37 – Server Version: 5.6.11 – PHP-Version: 5.5.1 SET SQL_MODE = „NO_AUTO_VALUE_ON_ZERO“; SET time_zone = „+00:00“; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; – -- Datenbank: shopware
– -- -------------------------------------------------------- – -- Struktur des Views view_shopware_artikelstamm
– CREATE ALGORITHM=UNDEFINED DEFINER=shopware
@localhost
SQL SECURITY DEFINER VIEW view_shopware_artikelstamm
AS select s_articles_details
.id
AS s_a_d_ID
,s_articles_details
.articleID
AS s_a_d_articleID
,s_articles_details
.ordernumber
AS ordernumber
,s_articles_details
.suppliernumber
AS suppliernumber
,s_articles_details
.kind
AS kind
,s_articles_details
.additionaltext
AS additionaltext
,s_articles_details
.impressions
AS impressions
,s_articles_details
.sales
AS sales
,s_articles_details
.instock
AS instock
,s_articles_details
.stockmin
AS stockmin
,s_articles_details
.weight
AS weight
,s_articles_details
.position
AS position
,s_articles_details
.width
AS width
,s_articles_details
.height
AS height
,s_articles_details
.length
AS length
,s_articles_details
.ean
AS ean
,s_articles_details
.unitID
AS unitID
,s_articles_details
.purchasesteps
AS purchasesteps
,s_articles_details
.maxpurchase
AS maxpurchase
,s_articles_details
.minpurchase
AS minpurchase
,s_articles_details
.purchaseunit
AS purchaseunit
,s_articles_details
.referenceunit
AS referenceunit
,s_articles_details
.packunit
AS packunit
,s_articles_details
.releasedate
AS releasedate
,s_articles_details
.shippingfree
AS shippingfree
,s_articles_details
.shippingtime
AS shippingtime
,s_articles
.id
AS s_a_ID
,s_articles
.supplierID
AS supplierID
,s_articles
.name
AS name
,s_articles
.description
AS description
,s_articles
.description_long
AS description_long
,s_articles
.shippingtime
AS s_a_shippingtime
,s_articles
.datum
AS datum
,s_articles
.active
AS active
,s_articles
.taxID
AS taxID
,s_articles
.pseudosales
AS pseudosales
,s_articles
.topseller
AS topseller
,s_articles
.metaTitle
AS metaTitle
,s_articles
.keywords
AS keywords
,s_articles
.changetime
AS changetime
,s_articles
.pricegroupID
AS pricegroupID
,s_articles
.pricegroupActive
AS pricegroupActive
,s_articles
.filtergroupID
AS filtergroupID
,s_articles
.laststock
AS laststock
,s_articles
.crossbundlelook
AS crossbundlelook
,s_articles
.notification
AS notification
,s_articles
.template
AS template
,s_articles
.mode
AS mode
,s_articles
.main_detail_id
AS main_detail_id
,s_articles
.available_from
AS available_from
,s_articles
.available_to
AS available_to
,s_articles
.configurator_set_id
AS configurator_set_id
,s_articles_attributes
.id
AS s_a_a_ID
,s_articles_attributes
.articleID
AS s_a_a_articleID
,s_articles_attributes
.articledetailsID
AS articledetailsID
,s_articles_attributes
.attr1
AS attr1
,s_articles_attributes
.attr2
AS attr2
,s_articles_prices
.id
AS s_a_p_ID
,s_articles_prices
.pricegroup
AS pricegroup
,s_articles_prices
.from
AS from
,s_articles_prices
.to
AS to
,s_articles_prices
.articleID
AS s_a_p_articleID
,s_articles_prices
.price
AS price
,s_articles_prices
.pseudoprice
AS pseudoprice
,s_articles_prices
.baseprice
AS baseprice
,s_articles_prices
.percent
AS percent
from (((s_articles
left join s_articles_details
on((s_articles
.id
= s_articles_details
.articleID
))) left join s_articles_prices
on((s_articles_prices
.articledetailsID
= s_articles_details
.id
))) join s_articles_attributes
) where ((s_articles_attributes
.articleID
= s_articles
.id
) and (s_articles_attributes
.articledetailsID
= s_articles_details
.id
)); – -- VIEW view_shopware_artikelstamm
– Daten: keine – /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Danke, auf ein view bin ich nicht gekommen. Das hilft mir weiter.