famar Posted November 14, 2012 Share Posted November 14, 2012 (edited) I have problem with label "new" overlapped on product image. How can I remove it? If I change the status of the product, nothing happens. thanks! --------- I find Number of day... in Preferenze->Product Edited November 14, 2012 by famar (see edit history) Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted November 14, 2012 Share Posted November 14, 2012 Hi, you will need to change your css or tpl files, for example themes/your_theme/product_list.tpl {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if} {*remove/comment this line*} Regards 1 Link to comment Share on other sites More sharing options...
famar Posted November 14, 2012 Author Share Posted November 14, 2012 Hi, you will need to change your css or tpl files, for example themes/your_theme/product_list.tpl {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if} {*remove/comment this line*} Regards thanks! Link to comment Share on other sites More sharing options...
mani313 Posted April 2, 2013 Share Posted April 2, 2013 (edited) could you tell where it get from database...( i mean i need the column name and table name n of this label in db).... Edited April 2, 2013 by mani313 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 2, 2013 Share Posted April 2, 2013 could you tell where it get from database...( i mean i need the column name and table name n of this label in db).... you want to edit code that alexander mentioned above? sorry but i dont quite understand what you expect Link to comment Share on other sites More sharing options...
mani313 Posted April 2, 2013 Share Posted April 2, 2013 you want to edit code that alexander mentioned above? sorry but i dont quite understand what you expect Now I got it...! I'm asked where the 'new' column in table regarding the product...like quantity... nw i understand there is no column like that...we have to calculate from date of product added... Link to comment Share on other sites More sharing options...
vekia Posted April 2, 2013 Share Posted April 2, 2013 Now I got it...! I'm asked where the 'new' column in table regarding the product...like quantity... nw i understand there is no column like that...we have to calculate from date of product added... exactly ! Link to comment Share on other sites More sharing options...
mani313 Posted April 2, 2013 Share Posted April 2, 2013 (edited) exactly ! but i struggle to find it...coz i'm fetch all product values(like quantity,price,name,image url etc) fetch from single query...so how can i calculate it and return 1 in a single query any idea? Edited April 2, 2013 by mani313 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 2, 2013 Share Posted April 2, 2013 but i struggle to find it...coz i'm fetch all product values(like quantity,price,name,image url etc) fetch from single query...so how can i calculate it and return 1 in a single query any idea? DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new 1 Link to comment Share on other sites More sharing options...
mani313 Posted April 3, 2013 Share Posted April 3, 2013 (edited) DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new Thank for the reply...and exactly! I got it already.... my code is "SELECT ((`ps_configuration`.value)-(DATEDIFF(NOW(), `ps_product`.date_add))) AS new FROM ps_configuration,ps_product WHERE ((`ps_configuration`.name='PS_NB_DAYS_NEW_PRODUCT') AND (`ps_product`.`id_product`=$id))" i worked above code for show manufacturer's products in product page...and the result would be...i got it exactly yesterday! I'm using raw sql code for fetching full product information and values on my area...coz i'm new to php and smarty, so go for this code I asking you learning platform for above mentioned courses....any suggestion? Edited April 3, 2013 by mani313 (see edit history) Link to comment Share on other sites More sharing options...
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