When i go to backoffice in Thirtybees 1.0.3 and upload an attachment in "Catalog - Attachments", i am not able to find the uploaded attachment when i go to a product and would like to choose the recent uploaded attachment.
If i dublicate a product with an attachment, the attachment disappears on the new product.
If i try to upload the attachment manually in each product, it works fine.
Problem solved 02.01.2018 by following @SLiCK_303's suggestion by replacing the code below in "Classes/Attachment.php"
public static function getAttachments($idLang, $idProduct, $include = true)
{
return Db::getInstance()->executeS('
SELECT *
FROM '._DB_PREFIX_.'attachment a
LEFT JOIN '._DB_PREFIX_.'attachment_lang al
ON (a.id_attachment = al.id_attachment AND al.id_lang = '.(int) $idLang.')
WHERE a.id_attachment '.($include ? 'IN' : 'NOT IN').' (
SELECT pa.id_attachment
FROM '._DB_PREFIX_.'product_attachment pa
WHERE id_product = '.(int) $idProduct.'
)'
);
}
Question
Minik
When i go to backoffice in Thirtybees 1.0.3 and upload an attachment in "Catalog - Attachments", i am not able to find the uploaded attachment when i go to a product and would like to choose the recent uploaded attachment.
If i dublicate a product with an attachment, the attachment disappears on the new product. If i try to upload the attachment manually in each product, it works fine.
Problem solved 02.01.2018 by following @SLiCK_303's suggestion by replacing the code below in "Classes/Attachment.php"
Replace:
with:
15 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now