Jump to content

suggestions for displaying multiple ecommerce promos


mdez13

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.