mdez13 Posted June 11, 2012 Share Posted June 11, 2012 hey guys, Right now i'm using a ridiculous amount of jquery to display promos on my search result pages. each product is wrapped with numerous DIVs to allow this to happen. I'm not really a php pro but i can usually get by. Im looking for suggestions for a way i could accomplish something similar with php just to make the site load a little bit faster while still being able to merchandize. i.e. right now i have a 10/15/20% promo going on. each product has a 10div 15div 20div all hidden, then i give my on sale products the keyword promo10, promo15, promo20 and use css to display the promo that has a bit of JS math in there to display the correct promo price. i also have some jquery that appends a 'promo' div each search result is wrapped with, that way i can display promo text under the result image. there are so many things going on it slows the site down so im looking for way to use PHP to display the promos rather than append with jquery. any ideas will be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/263994-suggestions-for-displaying-multiple-ecommerce-promos/ Share on other sites More sharing options...
btherl Posted June 12, 2012 Share Posted June 12, 2012 What you're asking is a bit general.. the short answer is yes, I believe you can use php to generate whatever html you are generating with jquery now. The long answer is it sounds like you want a more detailed answer, but I can't give anything more detailed from the description you've given me. Basically, php is capable of anything which produces static html. It isn't capable of anything which requires changing the html after the page has loaded. So if you want html generated for the initial page load, such as a few divs with different prices in them, php can do it. Quote Link to comment https://forums.phpfreaks.com/topic/263994-suggestions-for-displaying-multiple-ecommerce-promos/#findComment-1353088 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.