Jump to content

Customer Account Pages SLOW


avyona

Recommended Posts

I am getting daily reports of customers not being able to download their digital products from their order detail page. They say they click...nothing happens the browser just thinks and thinks. I believe the database is suspect having 492,185 orders in it.  And each of those orders have any number of individual download links. We are running a hostgator top dedicated server. I have already gone through and cleaned up unneccessary code, queries from mods and the like.

 

Cubecart_Downloads and Cubecart_orderInv each = 2,500,000 rows.

Cubecart_order_sum = 492,185

 

What should I do about this?  I believe that the huge number of rows in over inv and downloads is accounting for some serious choking on our website. Using Pingdom tools doesnt help because it doesnt ping account pages etc. I have racked my brain. I must now humble myself and ask, "What would you do with a bulky database like this?" Thanks in advance :)

Link to comment
Share on other sites

Hi

That is a reasonable number of rows but in a correctly indexed table with MySQL that is tuned correctly it shouldnt be any issue and we have clients with stores larger than that.

What version of CubeCart are you running - versions prior to V6 had quite a lot of missing indexes on tables that can be added to improve query performance.  What tuning of the MySQL server has been done - there is a huge amount that can and should be done when dealing with larger databases. How much memory does your server have ?  When you get to larger sites there is no one answer that fits anyone other than your setup

One other option of course is to archive out some customers and orders which is another approach we have taken with some of our larger cleints

Ian

Link to comment
Share on other sites

When CubeCart receives a download page request, there are three checks: the order exists and has been paid for, the expire parameters have not been met, and the file to download actually exists.

If there is any sluggishness in this process, that sluggishness should also show up when the admin is bringing up an order for a summary overview.

In your hosting control panel, you may have phpMyAdmin to administer the database. Find an order's accesskey from a recent order, then query for the record WHERE accesskey = that_value.

If the result is not sluggish, we may need to look elsewhere than the database.

 

Link to comment
Share on other sites

Hi

That is a reasonable number of rows but in a correctly indexed table with MySQL that is tuned correctly it shouldnt be any issue and we have clients with stores larger than that.

What version of CubeCart are you running - versions prior to V6 had quite a lot of missing indexes on tables that can be added to improve query performance.  What tuning of the MySQL server has been done - there is a huge amount that can and should be done when dealing with larger databases. How much memory does your server have ?  When you get to larger sites there is no one answer that fits anyone other than your setup

One other option of course is to archive out some customers and orders which is another approach we have taken with some of our larger cleints

Ian

I'm running cc3 heavily modded...and I mean heavily with tons of my own personal coding.  I have 32 GB of mem on the rack.  How would I go about archiving out orders?  I have already gone through and deleted customers who have 0 orders...that removed like 15k customers, but we still have 75k customers still.

 

When CubeCart receives a download page request, there are three checks: the order exists and has been paid for, the expire parameters have not been met, and the file to download actually exists.

If there is any sluggishness in this process, that sluggishness should also show up when the admin is bringing up an order for a summary overview.

In your hosting control panel, you may have phpMyAdmin to administer the database. Find an order's accesskey from a recent order, then query for the record WHERE accesskey = that_value.

If the result is not sluggish, we may need to look elsewhere than the database.

 

Bsmither, yes I get enormous lag in the admin when editing an order, viewing an order. Especially on black friday. I just give up on those kinda days.

 

A thing to consider is that I run a free.inc.php file attached to the vieworder.inc.php that contains if statements for each week spanning the past 4 years or so. Each week I edit my free.php file to create a new if statement... here is an example. keep in mind there are probably 300 if statements in this file and this is only two of them. Notice how the timestamps bump up to each other. the result is that there is a button at the bottom of the order summary page that can be clicked and a popup window displays download links to free products. Could this be what is slowing things down so badly? I mean I know if doesnt help things, but I'm not sure how else to give customers free downloads of our products cause you can only do one coupon at a time ya know? lol its a friggin mess.

$order = $db->select("SELECT prod_total, time, status, CubeCart_order_sum.customer_id,
 cart_order_id FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix'].
"CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix'].
"CubeCart_customer.customer_id WHERE ".$glob['dbprefix'].
"CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix'].
"CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id']));

$prod_total = $order[0]['prod_total'];
$time = $order[0]['time'];
$status = $order[0]['status'];

//////////JUNE23-MADELINE FONT, BANNER ALPHA, COWBOY BIRTH MONTHS'///
if ($prod_total > '4.90' && $time > '1435092677' && $time < '1436208463' && $status > '1') { 
        $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/
JUNE-23-2015-53GO9.html');
        $view_order->assign("FREEBIE_NAME",'FREEBIES');
	$view_order->parse("view_order.session_true.order_true.freebies");
}
if ($prod_total > '9.90' && $time > '1435092677' && $time < '1436208463' && $status > '1') {
        $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/
JUNE-23-2015-103V44.html');
        $view_order->assign("FREEBIE_NAME",'FREEBIES');
	$view_order->parse("view_order.session_true.order_true.freebies");
}
//////////JULY 6- BLASTOFF, SPACESHIP, SPACE FONT///////////
if ($prod_total > '4.90' && $time > '1436208464' && $time < '1436831215' && $status > '1') { 
        $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/
JUL-6-2015-5T3I9.html');
        $view_order->assign("FREEBIE_NAME",'FREEBIES');
	$view_order->parse("view_order.session_true.order_true.freebies");
}
if ($prod_total > '9.90' && $time > '1436208464' && $time < '1436831215' && $status > '1') {
        $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/
JUL-6-2015-10L53T.html');
        $view_order->assign("FREEBIE_NAME",'FREEBIES');
	$view_order->parse("view_order.session_true.order_true.freebies");
}

i forgot to mention that checkout on my website is horrendous as well. Customers just sit and stare waiting to connect to paypal. Another clue.

ive already installed cc6.06 on a test domain and server and I am importing things over. Got customers so far. Scared to do products. I guess I want to know if my cc3 store can be fixed or if its time for me to move on to newer venues. I shudder to think that shopify, bigcommerce and the likes of them are my only options. I enjoy tinkering when I want. I have loved cc for years. But I dont dont to waste a lot of time moving everything over to cc6 and then be faced with these monsters all over again. The goal is to improve performance. I would throw more money at at even bigger server, but why?  It should work fine what I have now. 

Edited by avyona
Link to comment
Share on other sites

CC3, you say? Sorry, I assumed CC6. Please edit your sig statement in your forum profile so we won't make that mistake again.

Do you have access to phpMyAdmin in your hosting control panel? If so, paste the SELECT query (replacing $glob['dbprefix'] with the actual table prefix if there is one) directly in phpMyAdmin. Use a quoted cart_order_id and customer_id pair that you know exists.

Yes, I see a number of solutions to increase efficiency in picking the if() block to eventually run. On the other hand, I think any server machine is going to be able to handle that code - no problem.

Link to comment
Share on other sites

so just take my above quote query and put in the actual values and run it in phpadmin?  I can do that. PHPadmin is my friend! Sorry for the confusion on the version. I would love to switch to cc6 and hope to, I just wanna make sure that something else isnt going on that is causing a horrid problem. Do you think I will be able to import cubecart_downloads and order inv into cc6 despite the size of it and do it successfully?  Or should I just tell my customers that their old orders are bye bye and warn them to download before it all gets wiped?

Link to comment
Share on other sites

Hmm... There isn't too much (but some) data manipulation in converting CC3 data to CC6 data. It's mostly changes to the database schema. Which means additions to the schema should survive, provided those additions do not conflict with column-names of new CC6 columns.

That is to say, in converting CC3 database to CC6 database, data is not being copied. It's the existing structure containing the data that is changing.

Also, if I haven't mentioned it before, find your hosting account's PHP error log. You say you have 32Gig on the rack. But PHP must be told how much RAM is available to it. If the PHP.INI setting is limiting PHP to 256MiB, that's all it gets. Also, PHP.INI will also limit the amount of time a script can run.

Link to comment
Share on other sites

off topic question...im importing cc3 product catalogue into the cc6 using the import tool.  I dont see an option in the drop down for product id?  Is there a reason or am I missing something?

Here is what I could find in regards to memory

phpmem.jpg

Link to comment
Share on other sites

If you own this server, and it sounds like you do, try the following then check the above table:

In the file /includes/ini.inc.php:

<?php
// Set error reporting to all but notices
error_reporting(E_ALL ^ E_NOTICE);
// display errors
@ini_set("display_errors", false);
// ste argument separator to &amp; from & for XHTML validity
@ini_set("arg_separator.output","&amp;");

// NEW STATEMENT TO UP MEMORY
@ini_set('memory_limit', '512M');

But the thing is, if PHP is running out of memory, PHP will crash -- as opposed to being sluggish -- and there should be a log entry in PHP's error_log (the table above says error logging is enabled). Until we validate this hypothesis, bumping the memory limit is just a best guess at fixing an unresponsive -- as opposed to sluggish -- web site.

Link to comment
Share on other sites

The slowness here will have nothing at all to do with php memory, php version (although general speed could be improved by tuning php, apache plus which php handler you use as well as installing a php opcode system) but will be mainly down to poor database design / optimisation as well as unoptimised MySQL server configuration

Ian

Link to comment
Share on other sites

The slowness here will have nothing at all to do with php memory, php version (although general speed could be improved by tuning php, apache plus which php handler you use as well as installing a php opcode system) but will be mainly down to poor database design / optimisation as well as unoptimised MySQL server configuration

Ian

Ian do you feel that an upgrade to cc6 will be of significant help?

Link to comment
Share on other sites

The slowness here will have nothing at all to do with php memory, php version (although general speed could be improved by tuning php, apache plus which php handler you use as well as installing a php opcode system) but will be mainly down to poor database design / optimisation as well as unoptimised MySQL server configuration

Ian

Ian do you feel that an upgrade to cc6 will be of significant help?

There would be some improvement as some queries are better optimised as is the database with additional indexes and while upgrading to V6 is recommended, you shouldnt do it just to try and gain a speed improvement.

As I have said, a detailed examination of the MySQL configuration is suggested and then an analysis of the MySQL server while it is running looking at a variety of metrics.

Ian

Link to comment
Share on other sites

  • 2 weeks later...

how would I go about adding the proper indexing to the database so that when a customer clicks the download link for a product it doesnt take 29 sec to pop the download dialog box?  Is there any code changes or is it all done via indexes certain tables. If so which tables do I add index or PRIMARY KEYs to?  Thanks in advance...sorry to bump this one but I was doing some pings on the downloads and have finally pinpointed what element on the viewOrder.inc.php page that causes such huge delays

 

Link to comment
Share on other sites

<?php
if (eregi(".inc.php",$HTTP_SERVER_VARS['PHP_SELF']) || eregi(".inc.php",$_SERVER['PHP_SELF'])) {
	echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>";
	exit;
}

	$view_order=new XTemplate ("skins/".$config['skinDir']."/styleTemplates/content/viewOrder.tpl");

	$view_order->assign("LANG_YOUR_VIEW_ORDER",$lang['front']['viewOrder']['order_no']." ".treatGet($_GET['cart_order_id']));

	$order = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id']));
	
	if($order == TRUE){
		
		//$view_order->assign("LANG_CUSTOMER_INFO",$lang['front']['viewOrder']['customer_info']);
		
		//$view_order->assign("LANG_INVOICE_ADDRESS",$lang['front']['viewOrder']['invoice_address']);
		//$view_order->assign("VAL_INVOICE_NAME",$order[0]['name']);
	  	//$view_order->assign("VAL_INVOICE_ADD_1",$order[0]['add_1']);
	  	//$view_order->assign("VAL_INVOICE_ADD_2",$order[0]['add_2']);
	  	//$view_order->assign("VAL_INVOICE_TOWN",$order[0]['town']);
	 	//$view_order->assign("VAL_INVOICE_POSTCODE",$order[0]['postcode']);
	  	//$view_order->assign("VAL_INVOICE_COUNTRY",countryName($order[0]['country']));
		
		
		//$view_order->assign("LANG_DELIVERY_ADDRESS",$lang['front']['viewOrder']['delivery_address']);
		//$view_order->assign("VAL_DELIVERY_NAME",$order[0]['name_d']);
	  	//$view_order->assign("VAL_DELIVERY_ADD_1",$order[0]['add_1_d']);
	  	//$view_order->assign("VAL_DELIVERY_ADD_2",$order[0]['add_2_d']);
	  	//$view_order->assign("VAL_DELIVERY_TOWN",$order[0]['town_d']);
	 	//$view_order->assign("VAL_DELIVERY_POSTCODE",$order[0]['postcode_d']);
	  	//$view_order->assign("VAL_DELIVERY_COUNTRY",$order[0]['country_d']);
		
		
		//if(empty($order[0]['customer_comments'])){
		//	$view_order->assign("VAL_CUSTOMER_COMMENTS",$lang['front']['viewOrder']['na']);
		//} else {
		//	$view_order->assign("VAL_CUSTOMER_COMMENTS",$order[0]['customer_comments']);
		//}
		//$view_order->assign("LANG_CUSTOMER_COMMENTS",$lang['front']['viewOrder']['customer_comments']);
		$view_order->assign("LANG_ORDER_SUMMARY",$lang['front']['viewOrder']['order_summary']);
		
		$view_order->assign("LANG_PRODUCT",$lang['front']['viewOrder']['product']);
		//$view_order->assign("LANG_PRODUCT_CODE",$lang['front']['viewOrder']['product_code']);
		$view_order->assign("LANG_QUANTITY",$lang['front']['viewOrder']['quantity']);
		$view_order->assign("LANG_PRICE",$lang['front']['viewOrder']['price']);

		
		$products = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_inv WHERE cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id']));

		 
	

		for($i=0;$i<count($products); $i++){
		
		
			if($products[$i]['digital']==1 && ($order[0]['status']>=2 && $order[0]['status']<=3) ){
				// get digital info 
				// Downloadable Product Options by convict -->
				$dpo_config = fetchDbConfig("Downloadable_Product_Options");
				if (isset($dpo_config['status']) && $dpo_config['status']==1) {

					$query = "SELECT * FROM ".$glob['dbprefix']."CubeCart_Downloads INNER JOIN ".$glob['dbprefix']."CubeCart_order_inv ON ".$glob['dbprefix']."CubeCart_Downloads.productId =  ".$glob['dbprefix']."CubeCart_order_inv.productId WHERE ".$glob['dbprefix']."CubeCart_Downloads.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_Downloads.optionItem = ".$glob['dbprefix']."CubeCart_order_inv.dpo AND ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$db->mySQLSafe($products[$i]['productId']). " AND ".$glob['dbprefix']."CubeCart_order_inv.id = ".$db->mySQLSafe($products[$i]['id']);
			
					$download = $db->select($query);
		
				} else {
					// original code ->
					$query = "SELECT * FROM ".$glob['dbprefix']."CubeCart_Downloads INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_Downloads.productId =  ".$glob['dbprefix']."CubeCart_inventory.productId WHERE cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$db->mySQLSafe($products[$i]['productId']);
					
					$download = $db->select($query);
					// <-
				}
				// <-- Downloadable Product Options by convict
				$view_order->assign("VAL_DOWNLOAD_LINK",$glob['storeURL']."/download.php?pid=".$download[0]['productId']."&oid=".base64_encode($_GET['cart_order_id'])."&ak=".$download[0]['accessKey']);
				$view_order->assign("LANG_DOWNLOAD_LINK",$lang['front']['viewOrder']['download_here']);
				$view_order->parse("view_order.session_true.order_true.repeat_products.digital_link");
		
			}

		
			$view_order->assign("TD_CLASS","");
			$view_order->assign("VAL_PRODUCT",$products[$i]['name']);
			//$view_order->assign("VAL_PRODUCT_OPTS",$products[$i]['product_options']);
			$view_order->assign("VAL_IND_QUANTITY",$products[$i]['quantity']);
			//$view_order->assign("VAL_IND_PROD_CODE",$products[$i]['productCode']);
			$view_order->assign("VAL_IND_PRICE",priceFormat($products[$i]['price']));

			$view_order->parse("view_order.session_true.order_true.repeat_products");
		}
///////////////////////////////////////////FREEBIES INCLUDE GOES HERE//////////////////////////////////	
	include("includes/content/free.inc.php");
		
		$view_order->assign("LANG_ORDER_LIST",$lang['front']['viewOrder']['review_below']); 
		
		$view_order->assign("LANG_ORDER_TIME",$lang['front']['viewOrder']['order_date_time']);
		$view_order->assign("VAL_ORDER_TIME",formatTime($order[0]['time']));
		
		//$view_order->assign("LANG_GATEWAY",$lang['front']['viewOrder']['payment_method']);
		//$view_order->assign("VAL_GATEWAY",str_replace("_"," ",$order[0]['gateway']));
		
		//$view_order->assign("LANG_SHIP_METHOD",str_replace("_"," ",$lang['front']['viewOrder']['ship_method']));
		//$view_order->assign("VAL_SHIP_METHOD",$order[0]['shipMethod']);
		
		$view_order->assign("LANG_SUBTOTAL",$lang['front']['viewOrder']['subtotal']);
		$view_order->assign("VAL_SUBTOTAL",priceFormat($order[0]['subtotal']));
		//.: adg_coupon_mod http://www.alexgoldberg.com/cubemods :.
		$view_order->assign("LANG_COUPON",$lang['front']['cart']['coupon']."<br>".$order[0]['coupon_code']);
		$view_order->assign("VAL_COUPON",priceFormat($order[0]['coupon_savings']));
//.: adg_coupon_mod :.
		//$view_order->assign("LANG_TOTAL_TAX",$lang['front']['viewOrder']['total_tax']);
		//$view_order->assign("VAL_TOTAL_TAX",priceFormat($order[0]['total_tax']));
		
		//$view_order->assign("LANG_TOTAL_SHIP",$lang['front']['viewOrder']['shipping']);
		//$view_order->assign("VAL_TOTAL_SHIP",priceFormat($order[0]['total_ship']));
		
		$view_order->assign("LANG_GRAND_TOTAL",$lang['front']['viewOrder']['grand_total']);
		$view_order->assign("VAL_GRAND_TOTAL",priceFormat($order[0]['prod_total']));
	
		$view_order->parse("view_order.session_true.order_true");
	
	} else {
		$view_order->assign("LANG_NO_ORDERS",$lang['front']['viewOrder']['order_not_found']);
		$view_order->parse("view_order.session_true.order_false");
	
	}
	
	
	$view_order->assign("LANG_LOGIN_REQUIRED",$lang['front']['viewOrder']['login_required']);
	
	if($ccUserData[0]['customer_id']>0) $view_order->parse("view_order.session_true");
	
	else $view_order->parse("view_order.session_false");
	
	$view_order->parse("view_order");
	
$page_content = $view_order->text("view_order");
?>

Here is my vieworder.inc.php file contents and here is an excerpt from the free.inc.php file...Its too long to post but I'll post the queries its pulling.

<?php
///testing new query
$order = $db->select("SELECT prod_total, time, status, CubeCart_order_sum.customer_id, cart_order_id FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id']));

$prod_total = $order[0]['prod_total'];
$time = $order[0]['time'];
$status = $order[0]['status'];



//////////Dec 28-Jan20///////////
if ($prod_total > '4.90' && $time > '1293494401' && $time < '1295600400' && $status > '1') { 
        $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iI/pages/sweetheartalpha.html');
        $view_order->assign("FREEBIE_NAME",'FREEBIES');
	$view_order->parse("view_order.session_true.order_true.freebies");
}

if ($prod_total > '9.90' && $time > '1293494401' && $time < '1295600400' && $status > '1') {
        $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iI/pages/dec28promo10.html');
        $view_order->assign("FREEBIE_NAME",'FREEBIES');
	$view_order->parse("view_order.session_true.order_true.freebies");
}

 

Link to comment
Share on other sites

As an experiment, if you've not done this already, to see if there is any change in responsiveness, in the vieworder.inc.php file, comment out the statement:

include("includes/content/free.inc.php");

Visit the page with the download URL.

Also, this query:

///testing new query
$order = $db->select("SELECT prod_total, time, status, CubeCart_order_sum.customer_id, cart_order_id FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id']));

Since only one customer can be associated with an order, maybe the part in the WHERE clause that specifies the customer_id can be dropped.

Link to comment
Share on other sites

///testing new query
$order = $db->select("SELECT prod_total, time, status, CubeCart_order_sum.customer_id, cart_order_id FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id']));
Link to comment
Share on other sites

I commented it out in the vieworder.inc.php and also in the template and it knocked off 4 secs but its still at 11.5 sec :(

 

its showing there is a redirect on the download....I'll bet that is the culprit!! Hmmm now where did I add that lol!! off to go dig

 

Link to comment
Share on other sites

The redirect is valid. CC3 is giving a URL for a direct download because the file is located within the folders of CubeCart.

Using the URL to the actual file, and still experiencing a delay after allowing the redirect (a diagnostic setting on the browser, usually not seen by the typical user), then we have some sort of delay with the web server.

Downloading a file directly only involves the web server -- not the database and not CubeCart.

Link to comment
Share on other sites

Still, killing four seconds from PHP working its way through free.inc.php tells me there is a golden opportunity to recode this for better efficiency.

I just asked for a common php file found in CC3 that does not involve CC3. Came right in, lickety-split!

So, I think the web server is not the issue.

Link to comment
Share on other sites

When I used pingdom.com to test that download url it returns a performance details that their is a redirect on the download link.  I remember having to get a little creative when I implemented to freebies because i had to put a doc as the download items so for instance instead of:

 

http://mysite.com/files/uploads/file.zip

 

I had to do this so provide MULTIPLE download links:

http://mysite.com/files/uploads/file.html

 

I remember the cart not liking the html extension and I had to alter code somewhere to accept the html most likely using a generic target="_blank" or something along those lines for it to even work.  Now I cant remember which file I edited to get that to work. Been looking for it for about two hours now lol download.php, vieworder.inc.php, vieworder.tpl index.php, cart.php ...nada... I usually take notes when I make a modification and I havent located it on the drive. Keep in mind I made that change in 2010 :/

/rage quit :2guns:

I'm going to take a break before I flip out..

i also did a test order just now and sent myself download links.  It automatically opened a new tab about:blank and then the oct stream kicked in with the save dialog box. It shouldnt do that normally. What the heck did i change!? lol

 

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