Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jQuery/Ajax Advanced Caching System 2.3.3


Dr. Rolex

Recommended Posts

This Add-On isn't completet for distribution yet, but I have created a DEMO site which you can look at if you're interested.

 

Please report all bugs/problems or features you would like to have as I plan to continue develop this Add-On far beyond it's release.

 

So What does it do?

 

It upgrades your shop to an Ajax shop where only the boxes/areas of the page that needs updating will update and by this eliminating the otherwise necessary page reload.

Two great things come with this; 1: The ugly reload of everything á la 1995 is now history and 2: It makes your page MUCH fast (as you will see in the DEMO) since it doesn't require the queries made for all the boxes.

 

It also include an advanced Caching Engine who primary uses PHP_APC (if you have it, it's rare on shared hosting I think, look it up) or otherwise fall back to the native file caching of oscommerce. PHP_APC is free and very easy to install:

http://php.net/manual/en/book.apc.php

 

In the admin section you will be able to select which pages that should be cached (standard is index.php (ignoring front page), product_info.php and product_reviews.php). You can also select the cache expiry time in seconds.

 

 

Look at these page transition, you can use any of them for the bodyContent <div> (main content page) when browsing including CSS3 3D-cube animations:

http://tympanus.net/Development/PageTransitions/

 

On the demo I have used a CSS Loading Spinner.

 

Don't forget to use the "back/forward" buttons in your browser. All pages will be cached in the browser with jQuery.data, so if the customer have visited the page before, not a single request will be made! There is of course an exclusion setting for some pages.

 

I'm working on making the installation as smooth as possible. You will not need to modify every page. Pages affected will be application_top.php, template_top.php, template_bottom.php, cache.php, general.php and probably some more.

 

 

I have also upgraded the admin section so that the configuration will be cached like in many other Add-Ons, but now you can see it in the "Cache Control" in Admin and also modify what you want to cache.

 

If you have PHP_APC, then I have included a modified php_apc.php file that uses osCommerce login security and also automatically rebuilds configuration cache on removal.

 

I have added a "Parse time window" using information from KISS, showing some benchmarking info.

 

More functions is on the way! I hope you like it! ;)

 

Enjoy!

DEMO: http://jholmster.com

Link to comment
Share on other sites

Nice job !

hellovajob some would say !!!

 

I quickly browsed your demo site, and noticed small issue with the category box getting out of sync with the actual content displayed.

 

when I have time, I'd be curious to know how it performs on my system (also with APC).

 

Keep it up ! :thumbsup:

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Nice job !

hellovajob some would say !!!

 

I quickly browsed your demo site, and noticed small issue with the category box getting out of sync with the actual content displayed.

 

when I have time, I'd be curious to know how it performs on my system (also with APC).

 

Keep it up ! :thumbsup:

 

Thanks! :)

 

I'm aware of the categories box issue. It has been fixed but I haven't uploaded it to the demo site yet.

But I'm thinking of forcing a new dynamic categories box on those who want this Add-On instead. Personally, I think it's an atrocity to keep the original category box on an ajax site.

 

Better to use a menu that loads once and then it's there and never needs to be refreshed again. That's how I done it on my own shop.

 

There's some other issues on the demo site what I haven't fixed yet; when a customer press the back/forward button in their browser or visiting an already visited page, then the data should be retrieved from the browsers local cache without the need for load but for some reason it requests it twice, both from cache and then from server.

 

Well, nothing for you to worry about, I'll give you another post when I have done some changes.

 

My plan is to also build a nice dashboard graph that analyzes the page_parse_time log so the store owner can turn on/off different cache to see which will be optimized for his/her site speed. Instead of using native html_graph in osC, I'm looking at this instead: https://developers.google.com/chart/

 

Right now, I'm afraid that I'm "overcaching". With PHP_APC I don't think this ever will be a problem, but for file caching, maybe it can be slower e.g. if there is many files.

 

I will try to make an easy way for people to choose which boxes in columnLeft/column/Right that should be refreshed. Right now, on my own shop I only refresh best sellers box and the breadcrumb. Instead I'm using jQuery boxes like the jQuery Cycle What's New Infobox .

 

It's not perfect (yet) but I believe this is the best way to go to create a true dynamic and alive shop.

 

Next stage will be to either create an ajax engine for the admin section to speed up order management and simplify common features like order editing, there's a lot to be done there. Dynamic infoboxes with new info would be cool too (like customers online, customers currently on the checkout process to name a few).

 

Another cool thing would be to make the Ajax engine for the catalog more intelligent and customize appearance based on the customers age/new customer/products bought before and so forth, all info needed exists in their IP (beware!).

 

This, I think, could really help boost sales if say a women visit a shop that sell clothes. She has done three orders before, all in the category shoes.

Then the specials/what's new/other boxes could analyze this and select products that they guess she would be interested of. Perhaps even offering her an unique special price on some product?

 

It feels a but evil to use directed marketing strategies, but it is only to accept that it's here and will be much more common in the feature.

In San Fransisco, when you enter a mall; the "market/advertising screens" sense who you are by analyzing your mobile phone and then customizes advertising directed to specifically you. Just a taste on what's coming!

 

With jQuery and Ajax, it really doesn't feel like there are any limitations anymore. Lot's of fun thing to do but so little of that precious time. :rolleyes:

Link to comment
Share on other sites

I don't know it there actually are people more than us few who is reading threads here on osC? How active is the forum nowadays, anybody knows?

 

Also, even though it's not related to this thread; what's the situation on "the competitions" Opencart, Magento, Zencart etc.?

I know very little about them, but it would be great if someone could give a heads up on how active they are in their communities and how active the ongoing development of the core modules are.

 

What is the main reason a osCommerce'r would want to migrate to another system, is it the package installation of the osC Add-Ons that people don't like or what's the reason?

 

Whatever it is, it's probably relatively fixable if it comes to the code for the shop. But my guess would be The Website, The Forum and all social related activities around osCommerce falling apart. That is what was once great (and still is) and have made osCommerce what it is.

 

An auto-updater for all versions to 2.3 is one thing that we need. A software that takes notice of modifications to the original files and still makes the upgrade work, the changes after all isn't huge or complex. A software that automatically reencodes the old database with every row and comment (because this was hell to do manually..) to utf-8 and then force utf-8 for on all connections and file writes. Also setting .htaccess if possible.

 

An Apache/PHP or worst case .htaccess configuration guide is also needed (perhaps it exists in the official docs).

 

Usually, I think, there are some minor configuration changes necessary to make the shop work much better, but these setting is almost impossible to be aware of with little knowledge of server configs.

 

Also, the Indexes and keys for the MySQL database would be really interesting to take a look at. Perhaps they are good for most people as a starting point but as the database grow, playing around a little with them will do wonders to the database speed.

 

BTW, is anyone here using Postgres SQL instead of MySQL?

I think it's Google's version of MySQL and you can start using it with your regular MySQL database, no changes needed.

 

 

Well, this POST became more Off-Topic than it was meant to, but I'm not removing it now when I spent too much time writing it, ha ha. :D

 

I have talked to someone who actually knows what happens inside a computer, and according to him, it's always preferable to cache (even if it's lousy file caching) then to use database queries. At least this is true as long as not every cached string has it's own file so I will continue my quest to slay the queries for us and try to place them in arrays in one file for those of you that need file caching.

 

My plan was to show you how the page transitions look tonight, but unfortunately I dont remember the exact CSS rules that needs to be applied to play all 70 of them, so hopefully, I can give you a little private show tonight. :thumbsup:

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

Where can i get this hard work that you have done to make my website faster please?

 

I didn't have time enough to complete it when I worked on it last year.. I kind of just kept on adding functions instead of completing the stuff I had already done. It has also been a hurdle to get it working with both php_apc and file caching.

I have made some updates to the demo site recently and I will try to complete the Add-On in the coming days (this probably should be interpreted as week(s)).

 

I've used it myself for quite a while and it really speeds things up and together with php_apc one can really optimize the site to almost instant page loads every time.

I've also made a dashboard widget for admin which shows a line plot similar to the ones that comes with osCommerce (total revenue and total customers graphs) that collects the page load times from the parse_time_log then calculates the mean value per hour and draws a easy to use graph over page load times per hour over the past weeks/months/years, it's configurable so it e.g. only reads the last 10000 lines from the log and can be updated with ajax to show stats for both admin and/or the catalog side of your shop.

 

It makes it easier to test different caching options and evaluate their success.

 

Fantastic!

I heard that AJAX is bad for SEO. How with this? Does this addon affect results in google?

 

No, it will not. Your links and buttons will be left untouched and bots like the Google bot don't use Javascript when it crawls your site. All links will be there just as before installation so for the bots the site will look exactly the same. I've tested it with Google's Spider testing tool and everything works fine.

Link to comment
Share on other sites

  • 1 month later...

Hello Jonas,

 

I'm testing the catalog side of this add-on and having some problems. The changes in includes/functions/cache.php, includes/template_bottom.php, and includes/template_top.php cause some conflicts in my catalog side. With Cache enabled, all categories with subcategories in them show "There are no products available in this category.". With Cache disabled, it's showing the subcategories perfectly.

Changes in template_bottom.php and template_top.php break the layout of my product description page (I have Product Tabs add-on installed). It's showing the shopping cart and categories boxes, breadcrumb, and footer in the tabs and when I click to switch to any other tab, it takes me back to the index page. So, I guess there is something in the code that causes compatibility issues between the add-ons. Right now I'm kind of stuck on these problems and can't move any further toward testing the admin side of this add-on. Hope you can help me find a solution.

 

Thanks in advance.

Link to comment
Share on other sites

Hello Jonas,

 

I'm testing the catalog side of this add-on and having some problems. The changes in includes/functions/cache.php, includes/template_bottom.php, and includes/template_top.php cause some conflicts in my catalog side. With Cache enabled, all categories with subcategories in them show "There are no products available in this category.". With Cache disabled, it's showing the subcategories perfectly.

 

Have you tried to change the Configuration => Ajax Engine - Cache Management => "Cache Control - Which pages should I cache?" option in your admin? Set it to nothing at all or only (product_info.php) . Then Clear the cache in Tools => Cache Control - OR - Tools => PHP_APC and try again.

In Step #6 - in includes/functions/general.php did you skip all changes except the first one at line 173?

 

Also, you might need to clear your cache directory manually. I'm not sure that the cached files mentioned in the "Cache Control - Which ... " option will be displayed properly without changing some code in admin.

It should be enough to replace admin/includes/functions/cache.php from the Add-On with the one you're using and make the last replacement at line 225 in Step #13 - in admin/includes/application_top.php and the one at Step #15 - in admin/includes/functions/general.php to display all cached files and be able to delete them in Tools => Cache Control.

 

Changes in template_bottom.php and template_top.php break the layout of my product description page (I have Product Tabs add-on installed). It's showing the shopping cart and categories boxes, breadcrumb, and footer in the tabs and when I click to switch to any other tab, it takes me back to the index page. So, I guess there is something in the code that causes compatibility issues between the add-ons. Right now I'm kind of stuck on these problems and can't move any further toward testing the admin side of this add-on. Hope you can help me find a solution.

 

Can you PM a link to your shop? I don't know what the Product Tabs add-on look like or how it works so it's hard to tell what needs to be done.

In which file does the code for this Add-On run?

 

The easiest way to debug problems with boxes not updating correctly or boxes / divs being displayed in the wrong places is to open Chrome Developer Tools, go to sources and open ext/modules/engine/jquery.catalog.engine.js. Then place a break point at line 190,

$( '#bm_best_sellers' ).replaceWith( bm_best_sellers );

 

Then click on a link so the browser run the code up til line 190. Hold the mouse pointer over the different variables above, defined from line 178 to 188 and make sure it found all divs.

Then press the icon for "Step over next function call" or press F10. Make sure that when you step over each of the replaceWith lines that the div is replaced properly in the layout.

 

If you have some other box or div that you need to replace, then you need to add it to this part of the code. E.g. if you want a review box to be updated and replaced, then first you need to add code to template_top.php so the box will be loaded on Ajax request. The code should be added right under this code:

if (!class_exists('bm_languages')) {
 include_once(DIR_WS_LANGUAGES . $language . '/modules/boxes/bm_shopping_cart.php');
 include_once(DIR_WS_MODULES . 'boxes/bm_shopping_cart.php');
}

 

Make sure that the box / div or whatever it is you want to display have an ID tag on it.

Then in ext/modules/engine/jquery.catalog.engine.js, you need to define the div to a variable by adding a line like this one right under line 182

bm_reviews = $( data ).closest( '#bm_reviews' ),

The #bm_reviews should be changed to the ID of your div. And last you need to add a line below line 192

$( '#bm_reviews' ).replaceWith( bm_reviews );

This code will replace the element with the bm_reviews ID tag with the new bm_reviews which you defined under line 182.

Link to comment
Share on other sites

I have XSell Add-on installed, so my admin/includes/functions/general.php code looks completely different from the instructions. I'm unsure on how to modify it, so I don't mess up the XSell add-on. Can you help me, please? Here is my function tep_reset_cache_block code:

function tep_reset_cache_block($cache_block) {
   global $cache_blocks;
 $pid = '*';
 if ($cache_block == 'xsell_products') {
  $pid = '';
   if (isset($_GET['add_related_product_ID']) ) {
 $pid =  $_GET['add_related_product_ID'];
   }
   if ( !$pid ) $pid = '*';
  }
   for ($i=0, $n=sizeof($cache_blocks); $i<$n; $i++) {
  if ($cache_blocks[$i]['code'] == $cache_block) {
  $glob_pattern = preg_replace('#-language.+$#', '-*', $cache_blocks[$i]['file']);
  foreach ( (array)glob(DIR_FS_CACHE . $glob_pattern . '.cache' . $pid) as $cache_file ) {
	 @unlink($cache_file);
  }
  break;
   }
 }
}

Link to comment
Share on other sites

I test this on my live store, so untill I can figure out how to properly incorporate this add-on, I have to use my original template_bottom.php and template_top.php files, therefore you won't be able to see the problem. I will PM you the link to my site, so you can see what the Product Tabs look like. For Product Tabs add-on I had to make changes in my product_info.php, so it calls the products_tabs.php file from includes/modules. Here is my includes/modules/products_tabs.php:

<?php
/*
 $Id$
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2010 osCommerce
 Released under the GNU General Public License
*/
?>
<script type="text/javascript">
 $(function() {
  $( "#tabs" ).tabs();
 });
</script>
<div id="tabs">
 <ul>
  <li><a href="#tabs-0"><?php echo TEXT_TAB_DESCRIPTION; ?></a></li>
<?php
// Tab 1
 if ($product_info['products_tab_1'] > '') {
?>
  <li><a href="#tabs-1"><?php echo PRODUCT_TABS_TAB_1; ?></a></li>
<?php } ?>
<?php
// Ttab 2
 if ($product_info['products_tab_2'] > '') {
?>
  <li><a href="#tabs-2"><?php echo PRODUCT_TABS_TAB_2; ?></a></li>
<?php } ?>
<?php
// Tab 3
 if ($product_info['products_tab_3'] > '') {
?>
  <li><a href="#tabs-3"><?php echo PRODUCT_TABS_TAB_3; ?></a></li>
<?php } ?>
<?php
// Tab 4
 if ($product_info['products_tab_4'] > '') {
?>
  <li><a href="#tabs-4"><?php echo PRODUCT_TABS_TAB_4; ?></a></li>
<?php } ?>
<?php
// Tab 5
 if ($product_info['products_tab_5'] > '') {
?>
  <li><a href="#tabs-5"><?php echo PRODUCT_TABS_TAB_5; ?></a></li>
<?php } ?>
<?php
// Review Tab
 if (PRODUCT_TABS_REVIEWS_TAB == 'True') {
?>
  <li><a href="#tabs-6"><?php echo TEXT_TAB_REVIEWS; ?></a></li>
<?php } ?>
<?php
// Ask a Question Tab
 if (PRODUCT_TABS_QUESTION_TAB == 'True') {
?>
  <li><a href="#tabs-7"><?php echo TEXT_TAB_ASK_A_QUESTION; ?></a></li>
<?php } ?>
<?php
// Tell a Friend Tab
 if (PRODUCT_TABS_FRIEND_TAB == 'True') {
?>
  <li><a href="#tabs-8"><?php echo TEXT_TAB_TELL_A_FRIEND; ?></a></li>
<?php } ?>
   </ul>
   <div id="tabs-0">
<?php
 echo stripslashes($product_info['products_description']);
?>
			  </div>
<?php
// Tab 1
 if ($product_info['products_tab_1'] > '') {
?>
   <div id="tabs-1">
  <br>
<?php
   echo stripslashes ($product_info['products_tab_1']);
?>
   </div>
<?php } ?>
<?php
// Tab 2
 if ($product_info['products_tab_2'] > '') {
?>
   <div id="tabs-2">
  <br>
<?php
   echo stripslashes ($product_info['products_tab_2']);
?>
   </div>
<?php } ?>
<?php
// Tab 3
 if ($product_info['products_tab_3'] > '') {
?>
   <div id="tabs-3">
  <br>
<?php
   echo stripslashes ($product_info['products_tab_3']);
?>
   </div>
<?php } ?>
<?php
// Tab 4
 if ($product_info['products_tab_4'] > '') {
?>
   <div id="tabs-4">
  <br>
<?php
   echo stripslashes ($product_info['products_tab_4']);
?>
   </div>
<?php } ?>
<?php
// Tab 5
 if ($product_info['products_tab_5'] > '') {
?>
   <div id="tabs-5">
  <br>
<?php
   echo stripslashes($product_info['products_tab_5']);
?>
   </div>
<?php } ?>
<?php
// Review Tab
   if (PRODUCT_TABS_REVIEWS_TAB == 'True') {
 echo '    <div id="tabs-6">';
  include( DIR_WS_MODULES . FILENAME_PRODUCT_REVIEWS );
 echo '    </div><div style="clear: both;"></div>';
   }
?>
<?php
// Ask a Question Tab
   if (PRODUCT_TABS_QUESTION_TAB == 'True') {
 echo '    <div id="tabs-7">';
  include( DIR_WS_MODULES . FILENAME_ASK_A_QUESTION );
 echo '    </div><div style="clear: both;"></div>';
   }
?>
<?php
// Tell a Friend Tab
   if (PRODUCT_TABS_FRIEND_TAB == 'True') {
 echo '    <div id="tabs-8">';
  include( DIR_WS_MODULES . FILENAME_TELL_A_FRIEND );
 echo '    </div><div style="clear: both;"></div>';
   }
?>
 </div>

Link to comment
Share on other sites

Here's an update for those of you that want a minimal installation, meaning that there will be no additional server caching for your shop but it will still make use of the jQuery.ajax requests and jQuery.data caching in the browser.

Step #1 - Copy new files

  1. ext/jquery/fancybox/*
  2. ext/modules/engine/*
     

Step #2 - Replace these files with the ones from the Add-On

 

  1. includes/modules/boxes/bm_shopping_cart.php
  2. includes/modules/boxes/bm_categories.php
  3. includes/modules/boxes/bm_best_sellers.php
     

 

Skip Step 2 & Step 3 in the installation instructions.

 

Step #4 - in includes/application_top.php

 

Find the following code around line 456

 $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

Replace with

 $breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT));

 

Skip Step 5.

 

Step #6 - in includes/functions/general.php

 

Find the following code around line 173

   if (!is_array($exclude_array)) $exclude_array = array();

Replace with

   if (!is_array($exclude_array)) $exclude_array = array();
 array_push($exclude_array, "ajax");

 

Proceed to make the changes mentioned in Step 7, 8, 9 & 10.

 

Step #11 - in stylesheet.css

 

Add to end of file

/* Ajax jQuery/Cache Engine 2.3.3 */
#ajax_container {
border: none !important;
width: 100%;
margin: 0;
padding: 0;
}
#ajax_dummy {

}
.pt-page-current,
.no-js .pt-page {
visibility: visible !important;
z-index: 1;
}
.no-js body {
overflow: auto;
}
.pt-page-ontop {
z-index: 999;
}
.ajax_container {
background-color: #FFF;
top: 1px;
position: absolute !important;
visibility: hidden;
overflow: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.ajax_container fieldset {
-webkit-transform: translate3d(0,0,0);  /* force texture */
-moz-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/* warp speed ahead */
.animClass {
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-perspective: 1000;
}
/* CSS3 Animations/Transitions */
/* Loading Circle */
#ajax_loader {
position: absolute;
display: none;
width: 100%;
height:100%;
background-color: rgba(255, 255, 255, 0.7);
z-index: 20;
}
#loader_content {
top: 8%;
position: relative;
width: 150px;
left: 50%;
margin-left: -75px;

/* top: 8%;
z-index: 20;
position: relative;
width: 90px;
left: 50%;
margin-left: -75px;
background-color: rgb(240, 248, 255);
opacity: 1;
height: 70px;
padding-top: 10px;
border-radius: 40px;
box-shadow: 0 0 35px rgba(33, 135, 231, 0.5);
border: 1px solid rgba(33, 135, 231, 0.3);*/
}
.ball {
background-color: rgba(0,0,0,0);
border:5px solid rgba(0,183,229,1);
opacity:.9;
border-top:5px solid rgba(0,0,0,0);
border-left:5px solid rgba(0,0,0,0);
border-radius:50px;
box-shadow: 0 0 45px #2187e7;
width:50px;
height:50px;
margin:0 auto;
-moz-animation:spin .5s infinite linear;
-webkit-animation:spin .5s infinite linear;
}
.ball1 {
background-color: rgba(0,0,0,0);
border:5px solid rgba(0,183,229,1);
opacity:.9;
border-top:5px solid rgba(0,0,0,0);
border-left:5px solid rgba(0,0,0,0);
border-radius:50px;
box-shadow: 0 0 15px #2187e7;
width:30px;
height:30px;
margin:0 auto;
position:relative;
top:-50px;
-moz-animation:spinoff .5s infinite linear;
-webkit-animation:spinoff .5s infinite linear;
}
@-webkit-keyframes spin {
0% { -webkit-transform:rotate(0deg); }
100% { -webkit-transform:rotate(360deg); }
}
@-moz-keyframes spin {
40% { -moz-transform:rotate(0deg); }
100% { -moz-transform:rotate(360deg); }
}
@keyframes spin {
40% { transform:rotate(0deg); }
100% { transform:rotate(360deg); }
}
@-webkit-keyframes spinoff {
0% { -webkit-transform:rotate(0deg); }
100% { -webkit-transform:rotate(-360deg); }
}
@-moz-keyframes spinoff {
40% { -moz-transform:rotate(0deg); }
100% { -moz-transform:rotate(-360deg); }
}
@keyframes spinoff {
40% { transform:rotate(0deg); }
100% { transform:rotate(-360deg); }
}
.stop {
display: none;
-webkit-animation-play-state:paused;
-moz-animation-play-state:paused;
}
/* Cube - Not working */
#3d-imagebox {
width: 250px;
height: 250px;
position: relative;
perspective: 1000px;
}
#3d-imagebox .active {
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: 1;
-webkit-animation-name: cubedemo;
animation: cubedemo;
-webkit-transform: rotateX(-90deg);
}
.transitions_cube_outgoing {
position: absolute;
width: 250px;
height: 250px;
display: block;
overflow: hidden;
-webkit-transform: scale3d(.835,.835,.835) translateZ(200px);
}
.transitions_cube_incoming {
position: absolute;
width: 250px;
height: 250px;
display: block;
overflow: hidden;
-webkit-transform: scale3d(.835,.835,.835) rotateX(90deg) translateZ(200px);
}
@-webkit-keyframes cubedemo {
0% { -webkit-transform: rotateX(0); -webkit-animation-timing-function: linear; }
50% { -webkit-transform: rotateX(-92deg); -webkit-animation-timing-function: ease-in; }
70% { -webkit-transform: rotateX(-84deg); -webkit-animation-timing-function: ease-in; }
80% { -webkit-transform: rotateX(-90deg); -webkit-animation-timing-function: ease-in; }
95% { -webkit-transform: rotateX(-88deg); -webkit-animation-timing-function: ease-in; }
100% { -webkit-transform: rotateX(-90deg); }
}
/* Toss */
.transitions_toss_outgoing {
/*z-index: 0;*/
}
.transitions_toss_incoming {
animation: toss 0.5s;
-webkit-animation-name: toss;
-webkit-animation-iteration-count: 1;
-webkit-animation-duration: 0.5s;
-webkit-transform: rotate(0) scale(1) translate(0,0);
opacity: 1;
z-index: 10;
}
@-webkit-keyframes toss {
0% { -webkit-transform: rotate(-30deg) scale(1.3) translate(-20px,-250px); opacity: 0; -webkit-animation-timing-function: ease-in-out; }
100% { -webkit-transform: rotate(0deg) scale(1) translate(0,0); opacity: 1; }
}
/* Dissolve */
.transitions_dissolve_outgoing {
opacity: 0;
overflow: hidden;
-webkit-animation-iteration-count: 1;
-webkit-animation-duration: 1s;
}
.transitions_dissolve_outgoing_active {
opacity: 0;
z-index: 2;
-webkit-animation-name: dissolve;
animation: dissolve 1s;
}
.transitions_dissolve_incoming {
opacity: 1;
z-index: 0;
}
@-webkit-keyframes dissolve {
0% { opacity: 1; }
1% { opacity: 1; }
100% { opacity: 0; }
}
/* FadeIn/FadeOut */
.transitions_fade_incoming {
z-index: 10;
}
.transitions_fade_outgoing {
-webkit-animation-iteration-count: 1;
-webkit-animation-duration: 0.75s;
opacity:1;
z-index: 20;
-webkit-animation-name: fade_img;
animation: fade_img;
}
@-webkit-keyframes fade_img {
0% { opacity: 1; }
100% { opacity: 0; }
}
/* Fadethrough */
.transitions_fadethrough_outgoing {
-webkit-animation-iteration-count: 1;
-webkit-animation-duration: 0.75s;
-webkit-transform: scale(1) translate(0,0);
-webkit-transform-origin: 50% 50%;
opacity: 0;
z-index: 20;
overflow: hidden;
visibility: hidden;
display:none !important;
}
.transitions_fadethrough_outgoing_active {
-webkit-animation-name: fadethrough;
animation: fadethrough;
}
@-webkit-keyframes fadethrough {
0% { -webkit-transform: scale(1) translate(0,0); opacity: 1; -webkit-animation-timing-function: ease-in-out; }
100% { -webkit-transform: scale(1.5) translate(0,-40px); opacity: 0; }
}
.transitions_fadethrough_incoming img {
z-index: 10;
overflow: hidden;
opacity: 1;


-webkit-mask-image: url(images/circle-mask.png);
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: 50% 50%;
-webkit-mask-size: 1500px;
-webkit-animation-duration: 2s;
-webkit-animation-name: iris;
-moz-animation: fadeIn 1.7s ease both;
ms-animation: fadeIn 1.7s ease both;
animation: fadeIn 1.7s ease both;
}
@keyframes fadeIn {
from { opacity: 0; transform: scale(.8); ms-transform:scale(1,1); -moz-transform:scale(1,1); -webkit-transform:scale(1,1); -o-transform:scale(1,1); }
}
@-webkit-keyframes iris {
0% { -webkit-mask-size: 0; -webkit-animation-timing-function: ease-in-out; }
100% { -webkit-mask-size: 1500px; -moz-transition: opacity 2.25s ease-in-out;}
}
#parseTime {
position: fixed;
display: block;
height: 70px;
left: 50%;
top: 40%;
z-index: 30000;
width: 200px;
margin-left: -100px;
}
#kiss_queries, #kiss_errors {/*display:none;*/}
#parseTime div {
padding: 10px;
box-shadow: 0 0 15px #2187e7;
background-color: rgb(245, 245, 245);
border-radius: 20px;
border: 2px solid rgb(0, 183, 229);
text-align: center;

color: #2F4F4F;
/*position: fixed;*/
}
#parseTimed {display:none;}

 

Step #12 - in includes/template_top.php

 

Find the following line

  echo tep_cache_best_sellers_box(1209600);

Replace with

  if (!class_exists('bm_languages')) {
	  include(DIR_WS_MODULES . 'boxes/bm_best_sellers.php');
    }
    $bm_best_sellers = new bm_best_sellers();
    echo $bm_best_sellers->getData();

 

Find and remove the following code

if (USE_CACHE == 'true' && (isset($_GET['cPath']) || isset($_GET['products_id']))) {
   $cache_trigger = false;
   $cache_name = '';
   // Read Cache if page is set - Ignoring front page
   if ( preg_match('/' . CACHE_CONTROL_MAIN_PAGES . '/', $PHP_SELF) ) {
  $cache_name = $PHP_SELF . (isset($_GET['cPath']) ? '-cPath-' . $_GET['cPath'] : '') . (isset($_GET['products_id']) ? '-products_id-' . $_GET['products_id'] : '') . (isset($language) ? '-language-' . $language : '') . (isset($_GET['show_total']) ? '-show_total-' . $_GET['show_total'] : '') . (isset($_GET['ajax']) ? '-ajax-' . $_GET['ajax'] : '') . (isset($currency) ? '-currency-' . $currency : '') . (isset($_GET['page']) ? '-page-' . $_GET['page'] : '') . '.page.cache';
  if (read_cache($cache_output, $cache_name, CACHE_EXPIRY_MAIN_PAGE)) {

    echo $cache_output;
    $cache_trigger = true;

    require(DIR_WS_INCLUDES . 'template_bottom.php');
    tep_exit();
  } else {
    ob_start();
  }
   }
 }

 

Step #13 - in includes/template_bottom.php

 

Find and remove the following code

if (USE_CACHE == 'true' && (isset($_GET['cPath']) || isset($_GET['products_id']))) {
 // Read Cache if page is set - Ignoring front page
 if ($cache_trigger === false) {
   if ( preg_match('/' . CACHE_CONTROL_MAIN_PAGES . '/', $PHP_SELF) ) {
  $cache_output = ob_get_contents();
  ob_end_flush();
 // Write new Cache entry containing current page
  write_cache($cache_output, $cache_name, CACHE_EXPIRY_MAIN_PAGE);
   }
 }
}

 

Step #14 - in includes/modules/boxes/bm_best_seller.php

 

Find the following code

   function execute() {

Replace with

   function getData($ajax = false) {

 

Find the following code

  if ((USE_CACHE == 'true') && empty($SID)) {
    $output = tep_cache_best_sellers_box(1209600);
  } else {
    $output = $this->getData();
  }

Replace with

  $output = $this->getData();

 

You might want to add the best sellers title definition to includes/languages/english.php

define('MODULE_BOXES_BEST_SELLERS_BOX_TITLE', 'Bestsellers');

 

All done! :)

Link to comment
Share on other sites

Hello, I just installed this featuare, I was goin to test the first time but Im getting the bellow error...

 

Parse error: syntax error, unexpected '[' in /home/xxxxxxxxxxxxxxx/includes/functions/general.php on line 1597

 

This is in "tep_reset_cache_block" function...

 

And the code is...

 

$cached_apc_variables = apc_cache_info('user')['cache_list'];

 

Any idea???

 

Thanks in advance...

Francisco

Link to comment
Share on other sites

Hello, I just installed this featuare, I was goin to test the first time but Im getting the bellow error...

 

Parse error: syntax error, unexpected '[' in /home/xxxxxxxxxxxxxxx/includes/functions/general.php on line 1597

 

This is in "tep_reset_cache_block" function...

 

And the code is...

 

$cached_apc_variables = apc_cache_info('user')['cache_list'];

 

Any idea???

 

Thanks in advance...

Francisco

 

Hi Francisco,

You modified the wrong general.php, you should have made that modification to admin/includes/functions/general.php not includes/functions/general.php.

 

__________

 

 

I realized that the replacement of the tep_get_products_special_price function in includes/functions/general.php shouldn't be there. So skip that step.

If you have already changed that function, then find this code around line 119 in includes/functions/general.php

////
// Return a product's special price (returns nothing if there is no offer)
// TABLES: products
 function tep_get_products_special_price($product_id) {
   if(MODULE_BOXES_SPECIALS_STATUS == 'true') {
  $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status = 1");
  $product = tep_db_fetch_array($product_query);
  return $product['specials_new_products_price'];
   } else {
  return false;
   }
 }

Replace with:

////
// Return a product's special price (returns nothing if there is no offer)
// TABLES: products
 function tep_get_products_special_price($product_id) {
   $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status = 1");
   $product = tep_db_fetch_array($product_query);
   return $product['specials_new_products_price'];
 }

Edited by Dr. Rolex
Link to comment
Share on other sites

Hello Dr. Rolex

 

I modifiedthe correct one...

 

please find bellow the whole error...

 

 

Parse error: syntax error, unexpected '[' in /home/moviec10/public_html/grecia/gestion/includes/functions/general.php on line 1597

 

Thanks,

Link to comment
Share on other sites

Hello Dr. Rolex

 

I modifiedthe correct one...

 

please find bellow the whole error...

 

 

Parse error: syntax error, unexpected '[' in /home/moviec10/public_html/grecia/gestion/includes/functions/general.php on line 1597

 

Thanks,

 

Could you do this temporarily modification to ./admin/includes/application_top.php, find

// define our general functions used application-wide
 require(DIR_WS_FUNCTIONS . 'general.php');

Replace with

// define our general functions used application-wide
 var_dump(phpversion('apc'));
 var_dump(phpversion());
 var_dump(apc_cache_info('user'));
 die;
 require(DIR_WS_FUNCTIONS . 'general.php');

 

Then remove any sensitive information and post the output here, or PM it to me if you don't want to post it. After that you can change back to the original code.

Link to comment
Share on other sites

Here's another update that fixes a bug in the tep_draw_button function, which was introduced with this Add-On, that changes the labels on buttons by giving two or more buttons the same ID tag.

 

I solved it by removing the jQuery code from running separately on every button and instead it runs one time for all buttons when the document have been rendered.

The jquery.catalog.engine.js have also been fixed so the buttons jQuery code is removed from cached variables to avoid displaying "fatter" buttons whenever a cached page is displayed.

 

In includes/functions/html_output.php replace the tep_draw_button function around line 391 with this code

////
// Output a jQuery UI Button
 function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) {
   $types = array('submit', 'button', 'reset');
   if ( !isset($params['type']) ) {
  $params['type'] = 'submit';
   }
   if ( !in_array($params['type'], $types) ) {
  $params['type'] = 'submit';
   }
   if ( ($params['type'] == 'submit') && isset($link) ) {
  $params['type'] = 'button';
   }
   if (!isset($priority)) {
  $priority = 'secondary';
   }
   $button = '<span class="tdbLink">';
   $icon_class = '';
   if ( isset($icon) ) {
  if ( !isset($params['iconpos']) ) {
    $params['iconpos'] = 'left';
  }
  $icon_class .= ' data-priority="'.$priority.'" data-icons="ui-icon-' . $icon . '"';
   }
   if (empty($title)) {
  $icon_class .= ' data-text="false"';
   } else {
  $icon_class .= ' data-text="true"';
   }
   if ( ($params['type'] == 'button') && isset($link) ) {
  $button .= '<a '.(isset($params['id']) ? $params['id'] : '' ).' class="tdb" href="' . $link . '"' . $icon_class;
  if ( isset($params['newwindow']) ) {
    $button .= ' target="_blank"';
  }
   } else {
  $button .= '<button class="tdb" type="' . tep_output_string($params['type']) . '"' . $icon_class;
   }
   if ( isset($params['params']) ) {
  $button .= ' ' . $params['params'];
   }
   $button .= '>' . $title;
   if ( ($params['type'] == 'button') && isset($link) ) {
  $button .= '</a>';
   } else {
  $button .= '</button>';
   }
   $button .= '</span>';
   return $button;
 }

 

In ./ext/modules/engine/jquery.catalog.engine.js, find this code around line 355

  $( ajax_container ).html( next_fs );

Replace with

  $( ajax_container ).html( next_fs.replace(/function\sicpr.+$/gm, "") );

 

In ./includes/template_bottom.php find the following code around line 14

<script type="text/javascript">
// Set Current Page Filename
window.filename = "<?php echo $PHP_SELF; ?>";
</script>

Replace with

<script type="text/javascript">
// Fixes jQuery Buttons
function icpr(data_priority,data_icons){if(data_priority=="primary")return{primary:data_icons};else return{secondary:data_icons}}$(".tdb").each(function(i){var data_priority=$(this).attr("data-priority"),data_icons=$(this).attr("data-icons"),data_text=$(this).attr("data-text");$(this).button({icons:icpr(data_priority,data_icons),text:(data_text=="false"?false:true)}).addClass('ui-priority-'+data_priority).parent().removeClass("tdbLink")});

// Set Current Page Filename
window.filename = "<?php echo $PHP_SELF; ?>";
</script>

 

Done!

 

____________________________________

 

Another update to the apc.php file which makes it simpler to remove a bunch of cached variables without the need to remove every single one of them by clicking on them one by one.

 

In ./admin/apc.php around line 196, find the following code

if ($AUTHENTICATED && !empty($MYREQUEST['DU'])) {
apc_delete($MYREQUEST['DU']);
}

Replace with

if ($AUTHENTICATED && !empty($MYREQUEST['DU'])) {
apc_delete($MYREQUEST['DU']);
}
if ( isset($_GET['delete_list']) && ($_GET['delete_list'] == '1') ) {
foreach ($_POST['result_list'] as $key => $value) {
 if (!apc_delete($value)) {
  $messageStack->add_session("Could not delete " . $value);
 } else {
  $messageStack->add_session("Successfully deleted " . $value, 'success');
 }
}
tep_redirect(tep_href_link("apc.php"));
die;
}

 

Find the following code around line 602

ol.menu a {
background:rgb(153,153,204);
border:solid rgb(102,102,153) 2px;
color:white;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
margin-left: 5px;
}
ol.menu a.child_active {
background:rgb(153,153,204);
border:solid rgb(102,102,153) 2px;
color:white;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
border-left: solid black 5px;
margin-left: 0px;
}
ol.menu span.active {
background:rgb(153,153,204);
border:solid rgb(102,102,153) 2px;
color:black;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
border-left: solid black 5px;
}
ol.menu span.inactive {
background:rgb(193,193,244);
border:solid rgb(182,182,233) 2px;
color:white;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
margin-left: 5px;
}
ol.menu a:hover {

Replace with

ol.menu a, .dcache {
background:rgb(153,153,204);
border:solid rgb(102,102,153) 2px;
color:white;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
margin-left: 5px;
}
ol.menu a.child_active {
background:rgb(153,153,204);
border:solid rgb(102,102,153) 2px;
color:white;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
border-left: solid black 5px;
margin-left: 0px;
}
ol.menu span.active, .dcache.active {
background:rgb(153,153,204);
border:solid rgb(102,102,153) 2px;
color:black;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
border-left: solid black 5px;
}
ol.menu span.inactive, .dcache.inactive {
background:rgb(193,193,244);
border:solid rgb(182,182,233) 2px;
color:white;
font-weight:bold;
margin-right:0em;
padding:0.1em 0.5em 0.1em 0.5em;
text-decoration:none;
margin-left: 5px;
}
ol.menu a:hover, .dcache:hover {

 

Find the following code around line 1063

 if (isset($MYREQUEST['SEARCH'])) {
  // Don't use preg_quote because we want the user to be able to specify a
  // regular expression subpattern.
  $MYREQUEST['SEARCH'] = '/'.str_replace('/', '\\/', $MYREQUEST['SEARCH']).'/i';
  if (preg_match($MYREQUEST['SEARCH'], 'test') === false) {
 echo '<div class="error">Error: enter a valid regular expression as a search query.</div>';
 break;
  }
 }

Replace with

 if (isset($MYREQUEST['SEARCH'])) {
  // Don't use preg_quote because we want the user to be able to specify a
  // regular expression subpattern.
  $MYREQUEST['SEARCH'] = '/'.str_replace('/', '\\/', $MYREQUEST['SEARCH']).'/i';
  if (preg_match($MYREQUEST['SEARCH'], 'test') === false) {
 echo '<div class="error">Error: enter a valid regular expression as a search query.</div>';
 break;
  }
 }
echo tep_draw_form('delete_list', "apc.php", 'delete_list=1', 'post','id="delete_list"');

 

Find the following code around line 1124

 foreach($list as $k => $entry) {
  if(!$MYREQUEST['SEARCH'] || preg_match($MYREQUEST['SEARCH'], $entry[$fieldname]) != 0) { 
    $field_value = htmlentities(strip_tags($entry[$fieldname],''), ENT_QUOTES, 'UTF-8');
    echo
	  '<tr class=tr-',$i%2,'>',
	  "<td class=td-0><a href=\"$MY_SELF&OB=",$MYREQUEST['OB'],"&SH=",md5($entry[$fieldkey]),"\">",$field_value,'</a></td>',
	  '<td class="td-n center">',$entry['num_hits'],'</td>',
	  '<td class="td-n right">',$entry['mem_size'],'</td>',
	  '<td class="td-n center">',date(DATE_FORMAT,$entry['access_time']),'</td>',
	  '<td class="td-n center">',date(DATE_FORMAT,$entry['mtime']),'</td>',
	  '<td class="td-n center">',date(DATE_FORMAT,$entry['creation_time']),'</td>';
    if($fieldname=='info') {
	  if($entry['ttl'])
	    echo '<td class="td-n center">'.$entry['ttl'].' seconds</td>';
	  else
	    echo '<td class="td-n center">None</td>';
    }
    if ($entry['deletion_time']) {
	  echo '<td class="td-last center">', date(DATE_FORMAT,$entry['deletion_time']), '</td>';
    } else if ($MYREQUEST['OB'] == OB_USER_CACHE) {
	  echo '<td class="td-last center">';
	  echo '[<a href="', $MY_SELF, '&OB=', $MYREQUEST['OB'], '&DU=', urlencode($entry[$fieldkey]), '">Delete Now</a>]';
	  echo '</td>';
    } else {
	  echo '<td class="td-last center">   </td>';
    }
    echo '</tr>';
    $i++;
    if ($i == $MYREQUEST['COUNT'])
	  break;
  }
 }

} else {
 echo '<tr class=tr-0><td class="center" colspan=',$cols,'><i>No data</i></td></tr>';
}
echo <<< EOB
 </tbody></table>
EOB;
if ($list && $i < count($list)) {
 echo "<a href=\"$MY_SELF&OB=",$MYREQUEST['OB'],"&COUNT=0\"><i>",count($list)-$i,' more available...</i></a>';
}
echo <<< EOB
 </div>
EOB;

Replace with

 echo '
 <button type="submit" class="dcache" onclick="javascript:return confirm("Are you sure?");">Delete selected files?</a>';
 foreach($list as $k => $entry) {
  if(!$MYREQUEST['SEARCH'] || preg_match($MYREQUEST['SEARCH'], $entry[$fieldname]) != 0) { 
   //var_dump($entry['info']);
   echo tep_draw_hidden_field('result_list[]', $entry['info']);
    $field_value = htmlentities(strip_tags($entry[$fieldname],''), ENT_QUOTES, 'UTF-8');
    echo
	  '<tr class=tr-',$i%2,'>',
	  "<td class=td-0><a href=\"$MY_SELF&OB=",$MYREQUEST['OB'],"&SH=",md5($entry[$fieldkey]),"\">",$field_value,'</a></td>',
	  '<td class="td-n center">',$entry['num_hits'],'</td>',
	  '<td class="td-n right">',$entry['mem_size'],'</td>',
	  '<td class="td-n center">',date(DATE_FORMAT,$entry['access_time']),'</td>',
	  '<td class="td-n center">',date(DATE_FORMAT,$entry['mtime']),'</td>',
	  '<td class="td-n center">',date(DATE_FORMAT,$entry['creation_time']),'</td>';
    if($fieldname=='info') {
	  if($entry['ttl'])
	    echo '<td class="td-n center">'.$entry['ttl'].' seconds</td>';
	  else
	    echo '<td class="td-n center">None</td>';
    }
    if ($entry['deletion_time']) {
	  echo '<td class="td-last center">', date(DATE_FORMAT,$entry['deletion_time']), '</td>';
    } else if ($MYREQUEST['OB'] == OB_USER_CACHE) {
	  echo '<td class="td-last center">';
	  echo '[<a href="', $MY_SELF, '&OB=', $MYREQUEST['OB'], '&DU=', urlencode($entry[$fieldkey]), '">Delete Now</a>]';
	  echo '</td>';
    } else {
	  echo '<td class="td-last center">   </td>';
    }
    echo '</tr>';
    $i++;
    if ($i == $MYREQUEST['COUNT'])
	  break;
  }
 }

} else {
 echo '<tr class=tr-0><td class="center" colspan=',$cols,'><i>No data</i></td></tr>';
}
echo <<< EOB
 </tbody></table>
EOB;
if ($list && $i < count($list)) {
 echo "<a href=\"$MY_SELF&OB=",$MYREQUEST['OB'],"&COUNT=0\"><i>",count($list)-$i,' more available...</i></a>';
}
echo <<< EOB
 </div>
EOB;
echo '</form>';

 

Done!

Link to comment
Share on other sites

Sorry, the tep_draw_button function in ./includes/functions/html_output needs to be replaced (again) with the code below.

If your using the function in my previous post, then custom classes applied to the buttons will not display properly.

 

////
// Output a jQuery UI Button
 function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) {
   $types = array('submit', 'button', 'reset');
   if ( !isset($params['type']) ) {
  $params['type'] = 'submit';
   }
   if ( !in_array($params['type'], $types) ) {
  $params['type'] = 'submit';
   }
   if ( ($params['type'] == 'submit') && isset($link) ) {
  $params['type'] = 'button';
   }
   if (!isset($priority)) {
  $priority = 'secondary';
   }
   $button = '<span class="tdbLink">';
   $icon_class = '';
   if ( isset($icon) ) {
  if ( !isset($params['iconpos']) ) {
    $params['iconpos'] = 'left';
  }
  $icon_class .= ' data-priority="'.$priority.'" data-icons="ui-icon-' . $icon . '"';
   } else {
  $icon_class .= ' data-priority="'.$priority.'"';
   }
   if (empty($title)) {
  $icon_class .= ' data-text="false" ';
   } else {
  $icon_class .= ' data-text="true" ';
   }
   if ( ($params['type'] == 'button') && isset($link) ) {
  $button .= '<a '.(isset($params['id']) ? 'id="' . $params['id'] . '"' : '' ).' href="' . $link . '"' . $icon_class;
  if ( isset($params['newwindow']) ) {
    $button .= ' target="_blank"';
  }
   } else {
  $button .= '<button '.(isset($params['id']) ? 'id="' . $params['id'] . '" ' : '' ).' type="' . tep_output_string($params['type']) . '"' . $icon_class;
   }
   $classes = ' class="tdb ';
   if ( isset($params['params']) ) {
  preg_match( '/class="([^"]*)"/', $params['params'], $classes_append);
  $classes .= $classes_append[1];
  $classes .= ' ' . str_replace($classes_append[1], '', $params['params']);
   }
   $classes .= '" ';
   $button .= $classes;
   $button .= '>' . $title;
   if ( ($params['type'] == 'button') && isset($link) ) {
  $button .= '</a>';
   } else {
  $button .= '</button>';
   }
   $button .= '</span>';
   return $button;
 }

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the hard work. I can not install this mod on 2.3.3.4, just to many errors. I tried it on a new install of 2.3.3 without any modifications at all. I dropped all new files on top of the fresh install.

Fatal error: Call to undefined function xdebug_disable() in C:\Inetpub\wwwroot\ashoptest\includes\application_top.php on line 18

on index page

 

Parse error: syntax error, unexpected '}' in C:\Inetpub\wwwroot\ashoptest\admin\includes\functions\cache.php on line 40

admin page

Tried it with 3 fresh installs so I know I did not miss the overlay.

 

// set the level of error reporting

error_reporting(E_ALL);

xdebug_disable();I don't know what this is

xdebug.remote_autostart=0

xdebug.remote_enable=0

Disable your profiller

xdebug.profiler_enable=0 putting it in the php.ini like this would do something but it will only break the page in where it is

If I comment it out in both aplications_top.php //xdebug_disable(); The index.php does come up with errors

Notice: Undefined index: products_id in C:\Inetpub\wwwroot\ashoptest\includes\application_top.php on line 515

 

Warning: array_key_exists() expects parameter 2 to be array, null given in C:\Inetpub\wwwroot\ashoptest\includes\application_top.php on line 515

 

Warning: array_flip() expects parameter 1 to be array, null given in C:\Inetpub\wwwroot\ashoptest\index.php on line 19

 

Warning: array_key_exists() expects parameter 2 to be array, null given in C:\Inetpub\wwwroot\ashoptest\index.php on line 20

 

Warning: constant() [function.constant]: Couldn't find constant SUBCATCOUNT_4 in C:\Inetpub\wwwroot\ashoptest\index.php on line 23

 

Warning: array_key_exists() expects parameter 2 to be array, null given in C:\Inetpub\wwwroot\ashoptest\includes\functions\general.php on line 105

 

Admin section will not come up

 

Parse error: syntax error, unexpected '}' in C:\Inetpub\wwwroot\ashoptest\admin\includes\functions\cache.php on line 40

 

 

Thanks Even with the errors on the Index page I can tell that the ajax is working.

Link to comment
Share on other sites

Adding // define our general functions used application-wide

var_dump(phpversion('apc'));

var_dump(phpversion());

var_dump(apc_cache_info('user'));

die;

require(DIR_WS_FUNCTIONS . 'general.php');

I get these errors

 

 

 

Notice: Undefined index: products_id in C:\Inetpub\wwwroot\ashoptest\includes\application_top.php on line 515

 

Warning: array_key_exists() expects parameter 2 to be array, null given in C:\Inetpub\wwwroot\ashoptest\includes\application_top.php on line 515 on index

 

 

Parse error: syntax error, unexpected '}' in C:\Inetpub\wwwroot\ashoptest\admin\includes\functions\cache.php on line 40

on admin

Link to comment
Share on other sites

Adding // define our general functions used application-wide

var_dump(phpversion('apc'));

var_dump(phpversion());

var_dump(apc_cache_info('user'));

die;

require(DIR_WS_FUNCTIONS . 'general.php');

I get these errors

 

 

 

Notice: Undefined index: products_id in C:\Inetpub\wwwroot\ashoptest\includes\application_top.php on line 515

 

Warning: array_key_exists() expects parameter 2 to be array, null given in C:\Inetpub\wwwroot\ashoptest\includes\application_top.php on line 515 on index

 

 

Parse error: syntax error, unexpected '}' in C:\Inetpub\wwwroot\ashoptest\admin\includes\functions\cache.php on line 40

on admin

 

All right, try instead to change this line in ./includes/application_top.php

// include cache functions if enabled
include(DIR_WS_FUNCTIONS . 'cache.php');

To this:

// include cache functions if enabled
 var_dump(phpversion('apc'));
 var_dump(phpversion());
 var_dump(apc_cache_info('user'));
 die;
 include(DIR_WS_FUNCTIONS . 'cache.php');

Or, if that doesn't give you any output, try this:

// include cache functions if enabled
 print_r(phpversion('apc'));
 print_r(phpversion());
 print_r(apc_cache_info('user'));
 die;
 include(DIR_WS_FUNCTIONS . 'cache.php');

 

You could also try to comment these lines in both ./includes/functions/cache.php - AND - ./admin/includes/functions/cache.php around line 20

// Check if PHP_APC is enabled and if so - Use It
if (function_exists('apc_cache_info') && ini_get('apc.enabled') == '1')
return apc_write_cache($var, $filename, $auto_expire);

And these around line 50

// Check if PHP_APC is enabled and if so - Use It
if (function_exists('apc_cache_info') && ini_get('apc.enabled') == '1')
return apc_read_cache($var, $filename);

 

This will disable apc, but if you know that it's not installed on your server it doesn't really matter.

Edited by Dr. Rolex
Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...