Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support thread for JcM Specials % discount Card Carousel CE BS4 and BS3


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

 

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply
  • 2 weeks later...
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

 

Link to comment
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

?>

 

Link to comment
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.

 

Link to comment
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

Link to comment
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.

 

Link to comment
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

 

Link to comment
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

 

Link to comment
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

 

Link to comment
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

 

Link to comment
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.

 

Link to comment
Share on other sites

  • 3 months later...
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

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...