Jump to content
Latest News: (loading..)

Recommended Posts

I have noticed someting strange in the transitions loop (in the 3rd case) :
1. If you check no transition (in admin), "default" transition (slide right to left) loops at each slide -> OK
2. If you check just one transition, the chosen transition loops at each slide -> OK
3. If you check at least two transistions, the slide loop is interspersed with "default" transition at each new transition -> !?!

For example, in fact it shows :

1.bounce_down -> 0."default" -> 2.clip_and_chess_in -> 0."default" -> 1.bounce_down -> 0."default" -> 2.clip_and_chess_in -> 0."default" -> and so on

Is there a way to have the true sequence - 1 -> 2 -> 1 -> 2 - without the default transition between ?

NB: This is the puzzle of this end of the year, enjoy ! :D

 


Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

Sorry, the right sequence is :
1.bounce_down -> 0."default" -> 2.clip_and_chess_in -> 1.bounce_down -> 0."default" -> 2.clip_and_chess_in -> 1.bounce_down -> 0."default" -> and so on

And for 3 transitions checked :
1 -> 0 -> 2 -> 0 -> 3 -> 1 -> 0 -> 2 -> 3 -> 1 -> and so on


 


Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites
4 hours ago, milerwan said:

Is there a way to have the true sequence - 1 -> 2 -> 1 -> 2 - without the default transition between ?

I don't know the answer to that and would have to spend time figuring it out, which means it probably won't be done anytime soon. I suggest asking on stackoverflow or checking the examples at jssor.

Share this post


Link to post
Share on other sites

Ok, the issue comes from double comma generated by script instead one :

[
{$Duration:1000,y:1,$Easing:$Jease$.$InBounce,$Opacity:2}
,, <!-- comma too much -->
{$Duration:1200,y:-1,$Cols:10,$Rows:5,$Clip:15,$During:{$Top:[0.5,0.5],$Clip:[0,0.5]},$Formation:$JssorSlideshowFormations$.$FormationStraight,$ChessMode:{$Column:12},$Opacity:2,$ScaleClip:0.5}
, <!-- comma too much -->
]

I will fix this later.
Need to go now.  ;)


Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

It's ok, I found where the creation of the unwanted comma is.

In "includes/modules/content/index/templates/tpl_cm_i_jssor.php" (same for "/header/templates/tpl_cm_header_jssor.php"), find :

function GetTransitions() {
    $picked = explode(';', MODULE_CONTENT_INDEX_JSSOR_TANSITIONS);
 
    $xsisitons = array();
    $xit = parse_ini_file(DIR_FS_CATALOG . '/ext/jssor/transitions.ini');
    foreach ($xit as $key => $data) { 
        if (in_array($key, $picked)) {
            $xsisitons[] = $data  .','; 
        }
    } 
    
    return '[' . join(',', $xsisitons) . ']';
}

and change like this :

function GetTransitions() {
    $picked = explode(';', MODULE_CONTENT_INDEX_JSSOR_TANSITIONS);
 
    $xsisitons = array();
    $xit = parse_ini_file(DIR_FS_CATALOG . '/ext/jssor/transitions.ini');
    foreach ($xit as $key => $data) { 
        if (in_array($key, $picked)) {
//            $xsisitons[] = $data  .',';
            $xsisitons[] = $data; 
        }
    } 
    
    return '[' . join(',', $xsisitons) . ']';
}

No more "default" transition parasite during the slider loop now. :)


Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

@milerwanThank you for posting the fix. I'll include it in the next version.

Share this post


Link to post
Share on other sites

The code uses the link function in oscommerce to build the link so that the session ID is not lost. To have it use an external link, make these changes in the jssor template file for the module you are using (header or index):

Find

$banner_query = tep_db_query("select banners_id, 

and change to

$banner_query = tep_db_query("select banners_id, banners_title,

Then find

           $urlArray[] = tep_href_link($banner['banners_url']);

and replace with

           if (strpos($banner['banners_url'], 'https') === FALSE) {
              $urlArray[] = tep_href_link($banner['banners_url']);
           } else {
              $urlArray[] = '<a href="' . $banner['banners_url'] . '">' . $banner['banners_title'] . '</a>';
           }  

I haven't tested it but it should work.  If the external site doesn't use http then you will need to change the above to test for that or, better, test for both.

Share this post


Link to post
Share on other sites

I just tried it here and it worked as expected. How is It failing now?

Share this post


Link to post
Share on other sites
On 12/21/2018 at 9:36 PM, osComMarket said:

Start use: http://kenwheeler.github.io/slick/
All the rest becomes not-necessary, and is easy to code upon-on.

Hi Henry, I did not understand what it is. Can you explain a little more so mortals understand?

Best regards

Valqui


I'm using oscommerce Edge v2.3.4.1

Get here the latest osCommerce Online Merchant Community Bootstrap Edition v2.3.4.1 CE

Share this post


Link to post
Share on other sites

@Jack_mcs   I installed this yesterday on the latest Frozen (Github) release and it works beautifully.  I wondered if it's possible for the slider to appear on all the store pages?  Let me explain why I ask that:  I know that some shopping cart software is meant to integrate into your existing web design (Stiva, for instance) and others are more or less stand-a-lone.  Because of this, I am doing my best to slowly customize the osCommerce storefront to look as similar to the overall site design as possible.  (I paid a lot of money for Stiva and hate it, compared to osCommerce, so you don't always get what you pay for.)

I notice that the breadcrumbs and the search feature remain on every page.  (I may eventually want to lose those, if my navigation project goes well.)  But can the banner slider also travel with each page or is it bound only to the front index?  Thanks.  😋

Share this post


Link to post
Share on other sites

The addon has two modules. One for the header and one for the home (index) page. Both are coded to only work on the index oage. You can change the one for the header to display on every page. To do that,  edit the includes/modules/content/header/cm_header_jssor.php file and change this

       if((basename($PHP_SELF) != 'index.php') || tep_not_null($cPath)){
      $this->enabled = false;
      }else{
      return $this->enabled;

to this

       if((basename($PHP_SELF) != 'index.php') || tep_not_null($cPath)){
      return $this->enabled;
      }else{
      return $this->enabled;

 

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

×