-
Posts
48 -
Joined
-
Last visited
Profile Information
-
Location
France
-
Activity
Freelancer
Pedro Pinto's Achievements
-
modifier css
Pedro Pinto replied to actima's topic in Utilisation de PrestaShop : configuration et difficultés
Quel est le thème que t'utilises? si t'utilises le default-theme, pour le menu principal [blocktopmenu] tu peut le modifier sur theme/modules/blocktopmenu.tpl (structure) theme/css/modules/blocktopmenu/css/blocktopmenu.css et superfish-modified.css (styles) pour le custom text block c'est la même ligne de pensé mais il faut voir... bonne chance -
modifier css
Pedro Pinto replied to actima's topic in Utilisation de PrestaShop : configuration et difficultés
Bonjour... une petite aide (prestashop doc) Prestashop Designer Guide Organization of a Theme bon courage. -
well...it works! i made an override on the Category classe inside public function getProducts( /** Return only the number of products */ if ($get_total) { $sql = 'SELECT COUNT(cp.`id_product`) AS total FROM `'._DB_PREFIX_.'product` p '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON p.`id_product` = cp.`id_product` LEFT JOIN `'._DB_PREFIX_.'feature_product` fp ON p.`id_product` = fp.`id_product` WHERE p.`id_product` = fp.`id_product` AND cp.`id_category` = '.(int)$this->id. ($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : ''). ($active ? ' AND product_shop.`active` = 1' : ''). ($id_supplier ? 'AND p.id_supplier = '.(int)$id_supplier : ''); if ((int)Group::getCurrent()->id == 4) { $sql .= ' AND fp.`id_feature` = 2 AND fp.`id_feature_value` = 251 AND p.`id_product` = fp.`id_product`'; } else { $sql .= ' AND fp.`id_feature` = 2 AND fp.`id_feature_value` != 251 AND p.`id_product` = fp.`id_product`'; } return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); } and $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) AS quantity'.(Combination::isFeatureActive() ? ', IFNULL(product_attribute_shop.id_product_attribute, 0) AS id_product_attribute, product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity' : '').', pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image, il.`legend` as legend, m.`name` AS manufacturer_name, cl.`name` AS category_default, DATEDIFF(product_shop.`date_add`, DATE_SUB("'.date('Y-m-d').' 00:00:00", INTERVAL '.(int)$nb_days_new_product.' DAY)) > 0 AS new, product_shop.price AS orderprice FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product` '.Shop::addSqlAssociation('product', 'p'). (Combination::isFeatureActive() ? ' LEFT JOIN `'._DB_PREFIX_.'product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop='.(int)$context->shop->id.')':'').' '.Product::sqlStock('p', 0).' LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (product_shop.`id_category_default` = cl.`id_category` AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop='.(int)$context->shop->id.') LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` LEFT JOIN `'._DB_PREFIX_.'feature_product` fp ON p.`id_product` = fp.`id_product` WHERE product_shop.`id_shop` = '.(int)$context->shop->id.' AND cp.`id_category` = '.(int)$this->id .($active ? ' AND product_shop.`active` = 1' : '') .($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '') .($id_supplier ? ' AND p.id_supplier = '.(int)$id_supplier : ''); if ((int)Group::getCurrent()->id == 4) { $sql .= ' AND fp.`id_feature` = 2 AND fp.`id_feature_value` = 251 AND p.`id_product` = fp.`id_product`'; } else { $sql .= ' AND fp.`id_feature` = 2 AND fp.`id_feature_value` != 251 AND p.`id_product` = fp.`id_product`'; } Thanks jgamio.
- 5 replies
-
- 1
-
- feature
- customer group
-
(and 2 more)
Tagged with:
-
thanks, but... i dont understand... dont i need 2 sql to get it work? - one for get products WITH feature value X to display to customer group A - one to get products WITHOUT feature value X to display to others customer group Thanks Update======================= i can do this work by using the above code in product-list.tpl and the opposite on product-list-pro.tpl {foreach from=$products item=product name=products} <!-- --> {if isset($product.features)} {foreach from=$product.features item=feature} {if $feature.name == 'Category'} {if $feature.value != 'A4'} but this is not the solution.... because this only hide the products but they continue to be part of the product count. still searching.... thanks
- 5 replies
-
- feature
- customer group
-
(and 2 more)
Tagged with:
-
Produit sur la page d'accueil
Pedro Pinto replied to Beezkit's topic in PrestaShop pour les développeurs
le même pour la 1.6 (fiche produit -> associations) -
hi, Display all products with feature value = "X" only to one customer group . Example: -customer group A can only see products without id_feature_value=X and display it on product-list.tpl - customer group B only see products with id_feature_value=X and display it on product-list-pro.tpl (in this case) At this point (and working), i've 2 product-list.tpl (one for the standart customer and the other for professional customer ) using this on category.tpl {if (int)Group::getCurrent()->id == 4} {include file="./product-list-pro.tpl" products=$products} {else} {include file="./product-list.tpl" products=$products} {/if} inside phpmyadmin using this query i get products with id_feature_value ="X" ('251' in this case) SELECT * FROM ps_product_lang pl,ps_product p,ps_feature_value_lang fvl,ps_feature_value fv,ps_feature f,ps_feature_lang fl WHERE pl.id_product=p.id_product AND fvl.id_feature_value=fv.id_feature_value AND fv.id_feature=f.id_feature AND fvl.id_lang=1 AND fl.id_feature =f.id_feature AND fl.id_lang=1 AND fv.id_feature_value=251 and now i'm stucked.....what files should i override to make this work? Thank You.
- 5 replies
-
- feature
- customer group
-
(and 2 more)
Tagged with:
-
Salut.... est ce que c'est possible d'ajouter des déclinaisons sur les cartes-cadeau? Pour le moment, avec quelques overrides (pas sur les fichiers du module) j'ai activé les déclinaison sur produits virtuels, donc je peut saisir des déclinaisons sur ces produits. Par contre, j'ai mis des déclinaisons sur la carte-cadeau et le prix a payer est le correct mais pas le valeur de la carte, elle reste avec le valeur de base (valeur defini au moment de la création de la carte). des idées?
-
hello everyone, with PS1.7.0.0 on xampp i got the following error when i try to access to the installed modules Cannot get catalog data, please try again later. Reason: Data from PrestaShop Addons is invalid, and cannot fallback on cache any idea? Thanks
-
Aqui vai o link (da mesma fonte onde copiaste o tema) explicando como fazer importaçao DUMP.sql http://www.templatemonster.com/help/prestashop-1-5-x-how-to-install-template-using-dump-sql-file.html Boa sorte. pequeno extra: este outro link explica-te como fazeres a instalaçao do tema (a partir da versao 1.6.0.6) www.templatemonster.com/help/prestashop-1-6-x-install-configure-template-existing-store-starting-prestashop-1-6-0-6.html
-
thanks it works.
-
it doesnt work. i had two carrier options: - get on shop (which is free) - normal shipping (9€) i got those for all my products. if i had one third option (free shipping) and i make it associated with some products (the only one available for those products) (and the others products to the two others option), when i add one product with shipping cost (9) and other without shipping cost i get free shipping cost on the total, but i dont want that.