Omar_one Posted March 14, 2017 Share Posted March 14, 2017 Hello, This addon adds a ribbon to every product having a special price. No new filesedited 2 file here is the addon http://addons.oscommerce.com/info/9557 here is a screenshot Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
Omar_one Posted March 15, 2017 Author Share Posted March 15, 2017 New update 1. The ribbon not working well with Safari .. I have just added some fixes for it. 2. change the ribbon text from (Sales) to (Sale). Omar Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
mcmannehan Posted March 15, 2017 Share Posted March 15, 2017 @@Omar_one great stuff. thanks for that. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
Omar_one Posted March 17, 2017 Author Share Posted March 17, 2017 @@mcmannehan you are welcome Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
vampirehunter Posted April 5, 2017 Share Posted April 5, 2017 Hello, This addon adds a ribbon to every product having a special price. No new files edited 2 file here is the addon http://addons.oscommerce.com/info/9557 here is a screenshot very nice Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 5, 2017 Share Posted May 5, 2017 @@Omar_one Omar when you were working on this did you (or anyone else reading this for that matter) come across anything that might also allow you to add different ribbons...ie Ships for Free, Discontinued Item or whatever? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Omar_one Posted May 5, 2017 Author Share Posted May 5, 2017 @@Dan Cole I have add different ribbons for Free Shipping Per Product for v2.3 addon , new products and out of stock ...I will look for the code. Omar Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 8, 2017 Share Posted May 8, 2017 @@Omar_one Omar...I had a little time yesterday so I set up a hook for this. I'm now thinking that it should have been a content module but I felt like messing around with a hook so that it what I did. A content module would allow for some configuration settings. In any case at this point it is a hook and is just set up for "specials" but I wrote it in a way that we could add different queries for example a new product, best seller or whatever and it would display a different ribbon. The idea being that we could have a series of queries and it would show a different ribbon based on those queries and if/case statements. If you like PM or email me and I'll send you what I have while I continue to develop it. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 19, 2017 Share Posted May 19, 2017 Thought a quick update was in order. I have now added this to my live shop and I quite like the way it looks. It quickly brings special items to the attention or our customers. As you might recall from my initial post, it entered this world as a hook and has remained that way so far. I'm not sure there is any real value in converting it to a content module but we'll see where it takes us. At this point I've added the hook to the product listing and new products page so it shows up on most pages but still needs to be added to the also purchased page and perhaps there are other pages where it should be included as well. My intention is to have it included on all product listing type pages. As for what the hook now does. So far it is set up to display a ribbon, using different colors and text, for new products, specials and for free shipping. It should be easy to add other ribbons as the ideas arise. I've also included the css directly within the hook but I'm leaning to having it in a separate css file. I just don't like seeing the css in the source code. If anyone wants to have a look at this or install it, pm me with your email address and I'll send you the code. Once it is tested by a few, I'll post the code here so anyone that wants it, or wants a chuckle at my coding skills, can have it. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Dan Cole Posted May 20, 2017 Share Posted May 20, 2017 I had a few minutes today to play around with this again and as I was tweaking the css for one of the pages I realized it was messing with the css created by my ribbon overlay hook on another page. Turns out that my product listing boxes are a slightly different size then the boxes on my specials and new products pages. I'm not sure if that is unique to my site or is standard osC but in any case as I was looking for a way to solve this I started thinking about ways to load different css code depending on the page you were calling and came up with this. <body id="<?php echo basename($_SERVER['PHP_SELF'], ".php")."-page"?>"> It gives you a unique ID (ie #index-page when on the index page or #specials-page when on the specials page etc.) for each page when added to template_top in place of the standard <body> tag. You can then target and alter the stardard css elements differently from page to page to set different sizes, fonts, colors etc. Of course it is not my original idea, just a trick I discovered and thought I would try to solve the problem I was having and as it turns out, it works like a charm. The only problem I have is that it alters cord code and I would like to avoid that if possible. Can anyone think of another way to do this without altering the core? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 5, 2017 Share Posted June 5, 2017 On 2017-05-19 at 11:46 PM, Dan Cole said: <body id="<?php echo basename($_SERVER['PHP_SELF'], ".php")."-page"?>"> It gives you a unique ID (ie #index-page when on the index page or #specials-page when on the specials page etc.) for each page when added to template_top in place of the standard <body> tag. You can then target and alter the stardard css elements differently from page to page to set different sizes, fonts, colors etc. Of course it is not my original idea, just a trick I discovered and thought I would try to solve the problem I was having and as it turns out, it works like a charm. The only problem I have is that it alters cord code and I would like to avoid that if possible. Can anyone think of another way to do this without altering the core? In the end I decided to scrap this idea and simply added the couple of css elements that needed to be changed as an inline style, to the hook, for the particular pages where they needed to be overridden. At this point I think I'm ready to stick a fork in this hook development and call it done. It is now deployed on my live site. As it stands now, it displays the appropriate ribbon (on sale, new item or ships free) on any page where the product can be viewed. Core changes are required to several pages since the hook needed to be registered and called. I ended up moving the css to a separate .css file since I didn't want to see displayed in the source. If anyone wants the hook send me a PM....I'm hoping that the placement of the hook in the individual files doesn't cause any grief for anyone so I'm still looking for a few folks to test it out before letting it loose in the community. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
mcmannehan Posted June 6, 2017 Share Posted June 6, 2017 I did use in my shop too, it works very will no bugs it's a great add-on and a great work from Omar_one The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 6, 2017 Share Posted June 6, 2017 Manfred I saw that you were using it too....all I did was to turn it into a hook and add a few preconfigured ribbons. It is definitely a good find by Omar. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
mcmannehan Posted June 7, 2017 Share Posted June 7, 2017 Dan, my version at Github don't have this add-on, but my inofficial version have it with preconfigured ribbon too. Yes, it's a very good work of Omar. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
♥Dan Cole Posted June 7, 2017 Share Posted June 7, 2017 Interesting...did you package it up as a hook, module or hard code it? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
mcmannehan Posted June 7, 2017 Share Posted June 7, 2017 2 hours ago, Dan Cole said: Interesting...did you package it up as a hook, module or hard code it? Dan Modul, but sorry not for the community The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
valquiria23 Posted June 14, 2017 Share Posted June 14, 2017 Hi all. It would be great to do a Ribbon for products with zero stock (out of stock). Best Regards. Valqui Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
Omar_one Posted June 15, 2017 Author Share Posted June 15, 2017 @valquiria23 here it is Out of Stock Ribbon For OsC2.3.4/BS BR Omar Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
sunshynecraftsbeads Posted June 16, 2017 Share Posted June 16, 2017 Out of stock Ribbon For OsCommerce 2.3.4/BS Hi Omar_one, First let me say thank you for the great addon. Been looking for something like this forever lol. I downloaded it this morning but found that it only has the picture and I can open or get the instructions on what files I need to change. I also downloadedd the origianl Special Ribbon overay but when I opened "Catalog/includes/modules/product_listing.php" to change the code I did not have the section that I am suppose to change. Did I miss something ? Thanks again for this add on. Tracie Link to comment Share on other sites More sharing options...
Omar_one Posted June 16, 2017 Author Share Posted June 16, 2017 @sunshynecraftsbeads are you using the Responsive version? you can post the product_listing.php here or PM it to me BR Omar Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
Omar_one Posted June 16, 2017 Author Share Posted June 16, 2017 New update Now the ribbons (Out of stock Ribbon and Specials Ribbon) will work with multi language shop. BR Omar Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
valquiria23 Posted June 16, 2017 Share Posted June 16, 2017 @Omar_one Try to make the changes but I have a question: in the file: /includes/modules/product_listing.php I find the following code: If (PRODUCT_LIST_BUY_NOW> 0) { $ Prod_list_contents. = '<Div class = "col-xs-6 text-right">'. Tep_draw_button (IMAGE_BUTTON_BUY_NOW, 'fa-shopping-cart', tep_href_link (basename ($ PHP_SELF), tep_get_all_get_params (array ('action')). 'Action = buy_now & products_id ='. $ Listing ['products_id']), NULL, NULL , 'Btn-success btn-sm'). '</ Div>'; } And not those you mention: If (PRODUCT_LIST_BUY_NOW> 0) { $ Prod_list_contents. = '<Div class = "col-xs-6 text-right">'. Tep_draw_button (IMAGE_BUTTON_BUY_NOW, 'fa-shopping-cart', tep_href_link (basename ($ PHP_SELF), tep_get_all_get_params (array ('action')). 'Action = buy_now & products_id ='. $ Listing ['products_id']), NULL, NULL , 'Btn-success btn-sm btn-product-listing btn-buy'). '</ Div>'; } I use OSC EDGE, where is the difference? Thank you very much!! Valqui Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
Omar_one Posted June 16, 2017 Author Share Posted June 16, 2017 @valquiria23 there is no difference, the change what mention from the last Edge version. you can change the code what you find it. BR Omar Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
sunshynecraftsbeads Posted June 18, 2017 Share Posted June 18, 2017 On 6/16/2017 at 10:00 AM, Omar_one said: @sunshynecraftsbeads are you using the Responsive version? you can post the product_listing.php here or PM it to me BR Omar Hi Omar, Yes I am. :D Link to comment Share on other sites More sharing options...
Omar_one Posted June 18, 2017 Author Share Posted June 18, 2017 @sunshynecraftsbeads Can you post you product_listing.php code here Omar Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.