Jump to content

Webshop Is Verry Slow


eriknv

Recommended Posts

Hello,

I've just upgraded from Cubecart 3 to Cubecart 4(0.3). If I try to check the product pages it takes a lot of time, in most cases more than 5 minutes. You can check it yourself out here: http://www.parfumwebshop.nl/parfum.

I use the Apache Rewriter Rule from the SEO Mode. Even I set off the SEO Mode, the same problem still occurs.

Can anyone help me solving this problem?

Many thanx in advance!

Link to comment
Share on other sites

Guest Brivtech

I don't know what you are talking about. It's actually very fast for me.

Oh, and you don't sell the 2 brands I buy - Rocabar by Hermes, and also Blue Stratus! :unsure:

Link to comment
Share on other sites

I don't know what you are talking about. It's actually very fast for me.

Yes that's because I had placed Cubecart v3 back. So I've still the problem I can't use the V4.

Big problem this :-(

Link to comment
Share on other sites

Guest Brivtech

Bossalini - AH! I see you have Rocabar now! I will remember than when I run out if I can't find any here.

I think I can see where Sir William is coming from. "Customers who bought this, also bought..." could be the problem, as the system is looking through all the orders for the product, to make a comparison of other common items. 3000 orders is quite a few to look through in an instant. See, V3 doesn't have this feature, so there is no need to make the search of the whole orders database each time a product is viewed.

I would have thought that somehow tagging this information onto the product would improve performance considerably, however, wouldn't that then slow down the checkout (if that would then be where the search for the feature would be made)?

What'cha cookin' up there Bill? I smell a solution! :(

Link to comment
Share on other sites

That's exactly the issue Brivtech. I've been talking to Al about this and we're trying to decide the best method to make this better while still keeping the feature in the store. I can't tell you when, but I can tell you it WILL be fixed. :D

:(

Link to comment
Share on other sites

Hi

I reported this as a bug a some time ago to Al - I had to remove this feature from one of my stores becase we have so many orders.

When do you think something will be done?

Adam

Link to comment
Share on other sites

  • 1 month later...

That's exactly the issue Brivtech. I've been talking to Al about this and we're trying to decide the best method to make this better while still keeping the feature in the store. I can't tell you when, but I can tell you it WILL be fixed. :D

:ninja:

Is there a solution for this problem allready? I don't want to remove my orders and customers.

Link to comment
Share on other sites

Guest dazza100

HI

I am having the same problem with over 3000 orders and 2000 products but I can’t see where to turn the feature off.

Can some one point me in the right direction?

Thanks

Daz

Link to comment
Share on other sites

  • 4 months later...
Guest mouselink

I too was having this problem so removed the code that checks the "customers also bought this".

This can be found in \includes\content\view_prod.inc.php

At the bottom of the file just remove the following code.

	

## start customers who bought this also bought...

	if (version_compare('4.1', $db->serverVersion(), '<=')) {



		$query = sprintf("SELECT DISTINCT O.productId, I.name, I.image, I.price, I.sale_price FROM %1\$sCubeCart_order_inv AS O, %1\$sCubeCart_inventory AS I WHERE I.productId = O.productId AND O.cart_order_id IN (SELECT DISTINCT cart_order_id FROM %1\$sCubeCart_order_inv WHERE productId = %2\$d) AND O.productId <> %2\$d LIMIT 3;", $glob['dbprefix'], $db->MySQLSafe($_GET['productId'], ''));



		$pastOrders = $db->select($query);



		if ($pastOrders == true && !isset($_GET['review'])) {

			for ($i=0; $i<count($pastOrders); $i++) {

				if (($val = prodAltLang($pastOrders[$i]['productId'])) == TRUE) {

					$pastOrders[$i]['name'] = $val['name'];

				}

				$thumbRootPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="root");

				$thumbRelPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="rel");



				if (file_exists($thumbRootPath) && !empty($pastOrders[$i]['image'])) {

					$view_prod->assign("VAL_IMG_SRC",$thumbRelPath);

				} else {

					$view_prod->assign("VAL_IMG_SRC",$GLOBALS['rootRel']."skins/". SKIN_FOLDER . "/styleImages/thumb_nophoto.gif");

				}



				if (!salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price'])) {

					$view_prod->assign("TXT_PRICE", priceFormat($pastOrders[$i]['price'], true));

				} else {

					$view_prod->assign("TXT_PRICE","<span class='txtOldPrice'>".priceFormat($pastOrders[$i]['price'], true)."</span>");

				}

				$salePrice = salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price']);

				$view_prod->assign("TXT_SALE_PRICE", priceFormat($salePrice, true));



				$view_prod->assign("VAL_PRODUCT_ID", $pastOrders[$i]['productId']);

				$view_prod->assign("VAL_PRODUCT_NAME",validHTML($pastOrders[$i]['name']));

				$view_prod->parse("view_prod.prod_true.related_products.repeat_prods");

			}

			$view_prod->assign("LANG_RELATED_PRODUCTS",$lang['viewProd']['related_products']);

			$view_prod->parse("view_prod.prod_true.related_products");

		}

	}

The problem is the sql statement takes a long time to run when you have a few orders !

Hope this helps

Darren

Link to comment
Share on other sites

Guest hennaboy

After a long time investigating I chose to make sure my site is gzip compressed. Compressing html, htm, jpg, js, css, php. Gzip level 9 compression.

This improved the website loading times by a long long way...82% saving which means that the loading time for the site is 0.05secs on a 1mb broadband connection ..0.97secs on dialup down from 5.37secs!!

As im using windows server 2003 then this was done by Native IIS compression.

Link to comment
Share on other sites

Guest Brivtech

Is there a solution for this problem allready? I don't want to remove my orders and customers.

You only need to remove the popular products feature, not the orders and customers.

No update by the look of it though - Any chance of an update anyone?

Link to comment
Share on other sites

Guest estelle

Is there a solution for this problem allready? I don't want to remove my orders and customers.

You only need to remove the popular products feature, not the orders and customers.

No update by the look of it though - Any chance of an update anyone?

? Its the 'customers who bought this also bought' feature that is causing the problem, it doesn't have anything to do with popular products.

I have already written a very small free mod that will allow you to disable the 'customers who bought this also bought' feature. The database query that is used to find these products is extremely slow for large stores.

You will find it in the "Free CubeCart 4 Mods" category at my store.

Link to comment
Share on other sites

I too was having this problem so removed the code that checks the "customers also bought this".

This can be found in \includes\content\view_prod.inc.php

At the bottom of the file just remove the following code.

	

## start customers who bought this also bought...

	if (version_compare('4.1', $db->serverVersion(), '<=')) {



		$query = sprintf("SELECT DISTINCT O.productId, I.name, I.image, I.price, I.sale_price FROM %1\$sCubeCart_order_inv AS O, %1\$sCubeCart_inventory AS I WHERE I.productId = O.productId AND O.cart_order_id IN (SELECT DISTINCT cart_order_id FROM %1\$sCubeCart_order_inv WHERE productId = %2\$d) AND O.productId <> %2\$d LIMIT 3;", $glob['dbprefix'], $db->MySQLSafe($_GET['productId'], ''));



		$pastOrders = $db->select($query);



		if ($pastOrders == true && !isset($_GET['review'])) {

			for ($i=0; $i<count($pastOrders); $i++) {

				if (($val = prodAltLang($pastOrders[$i]['productId'])) == TRUE) {

					$pastOrders[$i]['name'] = $val['name'];

				}

				$thumbRootPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="root");

				$thumbRelPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="rel");



				if (file_exists($thumbRootPath) && !empty($pastOrders[$i]['image'])) {

					$view_prod->assign("VAL_IMG_SRC",$thumbRelPath);

				} else {

					$view_prod->assign("VAL_IMG_SRC",$GLOBALS['rootRel']."skins/". SKIN_FOLDER . "/styleImages/thumb_nophoto.gif");

				}



				if (!salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price'])) {

					$view_prod->assign("TXT_PRICE", priceFormat($pastOrders[$i]['price'], true));

				} else {

					$view_prod->assign("TXT_PRICE","<span class='txtOldPrice'>".priceFormat($pastOrders[$i]['price'], true)."</span>");

				}

				$salePrice = salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price']);

				$view_prod->assign("TXT_SALE_PRICE", priceFormat($salePrice, true));



				$view_prod->assign("VAL_PRODUCT_ID", $pastOrders[$i]['productId']);

				$view_prod->assign("VAL_PRODUCT_NAME",validHTML($pastOrders[$i]['name']));

				$view_prod->parse("view_prod.prod_true.related_products.repeat_prods");

			}

			$view_prod->assign("LANG_RELATED_PRODUCTS",$lang['viewProd']['related_products']);

			$view_prod->parse("view_prod.prod_true.related_products");

		}

	}

The problem is the sql statement takes a long time to run when you have a few orders !

Hope this helps

Darren

Darren... WOW! I'd buy you a beer if I could. I just upgraded to 4.2.2. and was very concerned about how slow my catalog was responding. You know how it goes, if it takes more than a couple of seconds customers will go somewhere else. I removed this as you said, and it's zipping right along, same as usual.

Thanks TONS

Dayne

Link to comment
Share on other sites

  • 4 months later...
Guest sampleoidz

I too was having this problem so removed the code that checks the "customers also bought this".

This can be found in \includes\content\view_prod.inc.php

At the bottom of the file just remove the following code.

	

## start customers who bought this also bought...

	if (version_compare('4.1', $db->serverVersion(), '<=')) {



		$query = sprintf("SELECT DISTINCT O.productId, I.name, I.image, I.price, I.sale_price FROM %1\$sCubeCart_order_inv AS O, %1\$sCubeCart_inventory AS I WHERE I.productId = O.productId AND O.cart_order_id IN (SELECT DISTINCT cart_order_id FROM %1\$sCubeCart_order_inv WHERE productId = %2\$d) AND O.productId <> %2\$d LIMIT 3;", $glob['dbprefix'], $db->MySQLSafe($_GET['productId'], ''));



		$pastOrders = $db->select($query);



		if ($pastOrders == true && !isset($_GET['review'])) {

			for ($i=0; $i<count($pastOrders); $i++) {

				if (($val = prodAltLang($pastOrders[$i]['productId'])) == TRUE) {

					$pastOrders[$i]['name'] = $val['name'];

				}

				$thumbRootPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="root");

				$thumbRelPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="rel");



				if (file_exists($thumbRootPath) && !empty($pastOrders[$i]['image'])) {

					$view_prod->assign("VAL_IMG_SRC",$thumbRelPath);

				} else {

					$view_prod->assign("VAL_IMG_SRC",$GLOBALS['rootRel']."skins/". SKIN_FOLDER . "/styleImages/thumb_nophoto.gif");

				}



				if (!salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price'])) {

					$view_prod->assign("TXT_PRICE", priceFormat($pastOrders[$i]['price'], true));

				} else {

					$view_prod->assign("TXT_PRICE","<span class='txtOldPrice'>".priceFormat($pastOrders[$i]['price'], true)."</span>");

				}

				$salePrice = salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price']);

				$view_prod->assign("TXT_SALE_PRICE", priceFormat($salePrice, true));



				$view_prod->assign("VAL_PRODUCT_ID", $pastOrders[$i]['productId']);

				$view_prod->assign("VAL_PRODUCT_NAME",validHTML($pastOrders[$i]['name']));

				$view_prod->parse("view_prod.prod_true.related_products.repeat_prods");

			}

			$view_prod->assign("LANG_RELATED_PRODUCTS",$lang['viewProd']['related_products']);

			$view_prod->parse("view_prod.prod_true.related_products");

		}

	}

The problem is the sql statement takes a long time to run when you have a few orders !

Hope this helps

Darren

Darren... WOW! I'd buy you a beer if I could. I just upgraded to 4.2.2. and was very concerned about how slow my catalog was responding. You know how it goes, if it takes more than a couple of seconds customers will go somewhere else. I removed this as you said, and it's zipping right along, same as usual.

Thanks TONS

Dayne

thanks , fixed my problem

Link to comment
Share on other sites

  • 1 month later...
Guest go77306

Thanks it fixed my problem.

I changed this:

	

## start customers who bought this also bought...

	if (version_compare('4.1', $db->serverVersion(), '<=')) {




to:




	

## start customers who bought this also bought...

	if (false == true )) {




I paid $175 for the product... and I cannot use this feature... sad....





I too was having this problem so removed the code that checks the "customers also bought this". This can be found in \includes\content\view_prod.inc.php At the bottom of the file just remove the following code.

The problem is the sql statement takes a long time to run when you have a few orders !

Hope this helps

Darren

	

## start customers who bought this also bought...

	if (version_compare('4.1', $db->serverVersion(), '<=')) {



		$query = sprintf("SELECT DISTINCT O.productId, I.name, I.image, I.price, I.sale_price FROM %1\$sCubeCart_order_inv AS O, %1\$sCubeCart_inventory AS I WHERE I.productId = O.productId AND O.cart_order_id IN (SELECT DISTINCT cart_order_id FROM %1\$sCubeCart_order_inv WHERE productId = %2\$d) AND O.productId <> %2\$d LIMIT 3;", $glob['dbprefix'], $db->MySQLSafe($_GET['productId'], ''));



		$pastOrders = $db->select($query);



		if ($pastOrders == true && !isset($_GET['review'])) {

			for ($i=0; $i<count($pastOrders); $i++) {

				if (($val = prodAltLang($pastOrders[$i]['productId'])) == TRUE) {

					$pastOrders[$i]['name'] = $val['name'];

				}

				$thumbRootPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="root");

				$thumbRelPath = imgPath($pastOrders[$i]['image'], $thumb=1, $path="rel");



				if (file_exists($thumbRootPath) && !empty($pastOrders[$i]['image'])) {

					$view_prod->assign("VAL_IMG_SRC",$thumbRelPath);

				} else {

					$view_prod->assign("VAL_IMG_SRC",$GLOBALS['rootRel']."skins/". SKIN_FOLDER . "/styleImages/thumb_nophoto.gif");

				}



				if (!salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price'])) {

					$view_prod->assign("TXT_PRICE", priceFormat($pastOrders[$i]['price'], true));

				} else {

					$view_prod->assign("TXT_PRICE","<span class='txtOldPrice'>".priceFormat($pastOrders[$i]['price'], true)."</span>");

				}

				$salePrice = salePrice($pastOrders[$i]['price'], $pastOrders[$i]['sale_price']);

				$view_prod->assign("TXT_SALE_PRICE", priceFormat($salePrice, true));



				$view_prod->assign("VAL_PRODUCT_ID", $pastOrders[$i]['productId']);

				$view_prod->assign("VAL_PRODUCT_NAME",validHTML($pastOrders[$i]['name']));

				$view_prod->parse("view_prod.prod_true.related_products.repeat_prods");

			}

			$view_prod->assign("LANG_RELATED_PRODUCTS",$lang['viewProd']['related_products']);

			$view_prod->parse("view_prod.prod_true.related_products");

		}

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