Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function findTranslatedProduct(\Gd\GdProducts\Domain\Model\Products $products, $language) {
- $query = $this->createQuery();
- $query->statement(' SELECT *,
- NULL as sys_language_uid,
- NULL as l10n_parent
- FROM
- tx_gdproducts_domain_model_products
- WHERE
- 1 = 1 AND
- (hidden != 1 AND deleted != 1) AND
- pid = 37 AND
- sys_language_uid = 1 AND
- l10n_parent = 1
- ');
- $result = $query->execute()->getFirst();
- /* übersetztes objekt mit daten des originalen objektes befüllen */
- $result->setInstock($products->getInstock());
- $result->setCreationdate($products->getCreationdate());
- $result->setWeight($products->getWeight());
- $result->setBaseprice($products->getBaseprice());
- $result->setSalesprice($products->getSalesprice());
- $result->setShipping($products->getShipping());
- $result->setResaleright($products->getResaleright());
- $result->setProvision($products->getProvision());
- $result->setProvisioncomment($products->getProvisioncomment());
- $result->setPhoto($products->getPhoto());
- $result->setComments($products->getComments());
- $result->setManufacturer($products->getManufacturer());
- $result->setTechniques($products->getTechniques());
- $result->setSujet($products->getSujet());
- $result->setStyle($products->getStyle());
- $result->setSize($products->getSize());
- $result->setColors($products->getColors());
- $result->setTags($products->getTags());
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement