Jump to content

Recommended Posts

A simple addon to let you place a Specials carousel with “-20%” card on the index page. It takes the discount applied to specials.

You can edit the card color and text size and color in admin. You can also edit the border shadow effect.

This version has been updated to use owl 2.3.4 and try to fix the display issue. It no longer requires the owl_carousel 2.3.4 script to be loaded locally. These are now loaded to the header and footer using Header_Tags and use CDN rather than local install.

Owl requires the owl style sheets and jQuery to be loaded in a specific order to work properly. See the recommendations here

https://owlcarousel2.github.io/OwlCarousel2/docs/started-installation.html

If you are using any other add-on using owl it may cause issues if it’s not installed correctly.

It is still a no core change add-on.

Install and turn on both Header_Tags then simply install the other files and install and turn on the new add-on.

It has been tested on the v2.3.4.1 CE BS4 and BS3 Only.

image.png.6fb2bcb60db6e6e3b9655c955bdc27a7.png

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Excellent addon, I love it!

Congratulations Zahid for the tremendous work !!!


Setting up a new Frozen site with so many nice addons available on the market and waiting to be admitted to Phoenix club!

Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

Hi,

Good one. But still a little problem.

Install ok.

Put in 20% discount on a product. some will show -20% and some wil show -19.997979785 ?

Even if the prices are the same under specials in admin.

Greetings, Anne

 

Share this post


Link to post
Share on other sites
15 minutes ago, Dj-Viper said:

Put in 20% discount on a product. some will show -20% and some wil show -19.997979785 ?

What are you running? What are the special prices? what is you admin setup? You need to be carfull with % inputs as they may result in a price which is £19.94576254

As you will see from the test site its working fine with a range of prices when decimal places are set to 2 in admin.

image.png.ecaf21071f37b0ab5e9a4cbc35205e9d.png


 

Share this post


Link to post
Share on other sites

Well then you have a problem! You need to look at the code beeing produced for the display to see why this is happening, With out seeing the output I can not say why.

If it continues you may have to add aditional rounding on the display. I have never found this on any testing of Frozen CE BS3 or BS4. Code before this I can not say.

on the code displaying the price add

<?php
echo(round(number,2));
?>

For a long number it will,
<?php
echo(round(4.96754,2)); This will output 4.97

?>


 

Share this post


Link to post
Share on other sites

Hi,

Where should i put this, which file or in your contribution file ?

Greetings, Anne

By the way, modified your language file for dutch. Sorry for that.

 

Share this post


Link to post
Share on other sites

This is setting in test site, as you see number is more than 2 dec, places

image.png.b56ca2d68e3cec7253f771a27fac8a31.png

osC changes this when dec is set to 2 to this,

image.png.09d34d074e06124b2fe778f52286ee27.png

add-on shows this as

image.png.346de6597742461999ee931f0f483379.png

So as you see it's working fine.


 

Share this post


Link to post
Share on other sites
1 minute ago, Dj-Viper said:

Where should i put this, which file or in your contribution file ?

I would check your code first as it should not be required.


 

Share this post


Link to post
Share on other sites

I have no way of testing this as I can not make error happen.

In template file find around line 25

$wrapper_slides .= '        <div class="specials_product_discount2"><span><a href="' . tep_href_link('product_info.php', 'products_id=' . $specials_products['products_id']) . '">' . ((100 * $specials_products['specials_new_products_price'] / $specials_products['products_price']) - 100) . '%</a></span></div>';
    

and replace with,

$wrapper_slides .= '        <div class="specials_product_discount2"><span><a href="' . tep_href_link('product_info.php', 'products_id=' . $specials_products['products_id']) . '">' . (round((100 * $specials_products['specials_new_products_price'] / $specials_products['products_price']) - 100)) . '%</a></span></div>';
    

As I said if your osC is working properly this should not be required and I do not recomend it as its just hiding the real problem.


 

Share this post


Link to post
Share on other sites

Hi,

Has to do something with the rounding of the numbers. In the admin i have under currencies 2 decimals behind. as rounding, but when i look in the specials module in the admin than it gives a 4 decimal after the , instead of 10,55 its 10,5440

Greetings, Anne

Share this post


Link to post
Share on other sites

Yes I was able to make the error, it only happens if you enter a price in the specials, works fine if you enter %. The above code change fixes the problem.

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Hi, 

Good to know. The fix in the template file worked for me. Know i have to find out how to get the alignment a little bit better.

See www.fotomeinema.nl 

Would like to have it more like the new products module, 4 products on a row, alignment of the button next each other and more centered.

I tried to compare the two modules, but yours is more comprehensive.

Greetings, Anne

By the way, if you need somebody to translate the lang. files to dutch and germany let me know.

 

Share this post


Link to post
Share on other sites

Hi,

Getting there. Stuppid me, had a owl carousel on index running from a old banner rotator. Disabled that, little more padding between the boxes and got it scrolling.

Only thing now is the box size change more square.

Greetings, Anne

 

Share this post


Link to post
Share on other sites

Hi,

Step further, would be nice to put in the manual also that there are 2 templages, I thought it would be auto select by script, but needed to rename the BS3 file.

Now i need something for the thumbs they are very blurry.

Greetings, Anne

 

Share this post


Link to post
Share on other sites
42 minutes ago, Dj-Viper said:

Now i need something for the thumbs they are very blurry.

Are you using some other add-on to make thumbnails? They should be ince and clear see the test site.

https://www.justfastfood.com/

Yours look to be very poor but its how you have then setup! I don't like making poor quality thumbs, I prefer to have a large high quality image and use the php script to auto select the right image to use. Any way you it's for you to decide, best to have good quality images, customers buy with their eyes. 😊

https://apps.oscommerce.com/8OSyE&amp;jcm-adaptive-images-addon-frozen

image.thumb.png.3530403b54cc19561cf97984feeff5d5.png

image.png.e86904b2c0bf0406926d6ffa0237143d.png


 

Share this post


Link to post
Share on other sites

Hi,

Found that problem also, just now. 

I use kiss it image thumbnailer for the images, it's on html output and products info pages. But its not in the add ons. The addons use the internal setting of oscommerce.

small image height and width had those on 100 and 80, bumped them up to 175 both and it looks much better as you can see.

Greetings, Anne

 

Share this post


Link to post
Share on other sites

:thumbsup: yes looks much better now for all images.

I still don't understand why it's using images from here,

src="shopimages/thumbs/175_175/5081304281796.jpg"

It should be using images from images/  ie, the good large high quality ones as in the test site.

src="images/disciples-sacred-lands-box.jpg"

Must be somthing to do with the way you have your images set up? But its better than before.

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Hi, 

Correct, i have the images that i use for the shop in another directory /shopimages

Indeed i have to watch every contribution from now on because the dir_ws... was taken out.

Greetings, Anne

 

Share this post


Link to post
Share on other sites

Would it be possible to make it shoow this % discount card on every box where a product image is shown ?

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, Kurre said:

Would it be possible to make it shoow this % discount card on every box where a product image is shown ?

I'm not sure what you mean? the discount only applys to specials so it will only be relavent to them. If you do mean all specials modules ie index page box etc. Then yes you can, you will need to add the code to each module or make a new module. I the specials box is done it's on this test site. https://justfastfood.com/

https://apps.oscommerce.com/dO6J7&amp;jcm-custom-specials-box-bs4-3

 

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Yes that was what I meant, all the speciales in the New products for march on the index page would have the % discount card, you dont have the code for that one to ?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×