Archives for 

Interspire Shopping Cart Mod

Preview Hidden Products in Interspire Shopping Cart

Preview Hidden Products in Interspire Shopping Cart

Interspire Shopping Cart admins need to preview products before they go live.

Yep, we’re talking about Interspire once again today. 

The Interspire Shopping Cart doesn’t allow you to preview products that you are editing without making the product live in the store. This is plain silly; it’s vital for store owners to make sure their products pages look just as they expect when they make the product live in their store. As it is currently (in Interspire 5.5.x), this is not possible.

All it takes is one minor change in code, and your world gets a lot easier.

Mod: Preview Products That are Not Visible

Find the following code in includes/classes/class.products.php near line 126:

$query = "
	SELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, pi.*, ".GetProdCustomerGroupPriceSQL().",
	(SELECT COUNT(fieldid) FROM [|PREFIX|]product_customfields WHERE fieldprodid=p.productid) AS numcustomfields,
	(SELECT COUNT(reviewid) FROM [|PREFIX|]reviews WHERE revstatus='1' AND revproductid=p.productid AND revstatus='1') AS numreviews,
	(SELECT brandname FROM [|PREFIX|]brands WHERE brandid=p.prodbrandid) AS prodbrandname,
	(SELECT COUNT(imageid) FROM [|PREFIX|]product_images WHERE imageprodid=p.productid) AS numimages,
	(SELECT COUNT(discountid) FROM [|PREFIX|]product_discounts WHERE discountprodid=p.productid) AS numbulkdiscounts
	FROM [|PREFIX|]products p
	LEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb=1 AND p.productid=pi.imageprodid)
	WHERE ".$productSQL." AND p.prodvisible='1'
";

Replace this code with:

$query = "
	SELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, pi.*, ".GetProdCustomerGroupPriceSQL().",
	(SELECT COUNT(fieldid) FROM [|PREFIX|]product_customfields WHERE fieldprodid=p.productid) AS numcustomfields,
	(SELECT COUNT(reviewid) FROM [|PREFIX|]reviews WHERE revstatus='1' AND revproductid=p.productid AND revstatus='1') AS numreviews,
	(SELECT brandname FROM [|PREFIX|]brands WHERE brandid=p.prodbrandid) AS prodbrandname,
	(SELECT COUNT(imageid) FROM [|PREFIX|]product_images WHERE imageprodid=p.productid) AS numimages,
	(SELECT COUNT(discountid) FROM [|PREFIX|]product_discounts WHERE discountprodid=p.productid) AS numbulkdiscounts
	FROM [|PREFIX|]products p
	LEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb=1 AND p.productid=pi.imageprodid)
	WHERE ".$productSQL."
";

	// Begin View Hidden Products Mod
	if(!isset($GLOBALS['ISC_CLASS_ADMIN_AUTH'])) { $GLOBALS['ISC_CLASS_ADMIN_AUTH'] = GetClass('ISC_ADMIN_AUTH'); }
	// If the user has product editing capability, they can see the product when it's not visible on live store.
	if(!$GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Edit_Products)) {
		$query .= " AND p.prodvisible='1'";
	}
	// End View Hidden Products Mod

Now you can preview your products!

Now, any user with the permission to edit products will be able to see products that are not visible to users in the store.

These types of small changes make the Interspire Shopping Cart an even better product.

Any other things you’d like to see made possible using Interspire Shopping Cart?

Related posts:

  1. Add ‘Customers Also Purchased’ to the Cart Page on Interspire Shopping Cart
  2. How to Add an `Edit Product` Link for Interspire Shopping Cart
  3. Improve Interspire Shopping Cart Search with Smart Redirections

Add ‘Customers Also Purchased’ to the Cart Page on Interspire Shopping Cart

 “Customers Also Purchased” should be on the cart page, right? The Interspire Shopping Cart has a “Customers Also Bought” feature, but for some reason, they didn’t think to make it functional on the cart page — one of the most useful (and obvious) places to have the feature. This modification will allow you to place the […] Related posts:
  1. Preview Hidden Products in Interspire Shopping Cart
  2. Generate CSS Body Classes in Interspire Shopping Cart
  3. How to Add an `Edit Product` Link for Interspire Shopping Cart
Continue reading →

Generate CSS Body Classes in Interspire Shopping Cart

 If you’re used to WordPress’ body_class() function, this post for you. Working with WordPress, it’s easy to get accustomed to some of its nice features, like the body_class() function introduced in WP 2.8. When working with Interspire Shopping Cart, I wanted the same level of information added to the page’s <body> tag. Let’s do this in […] Related posts:
  1. Add ‘Customers Also Purchased’ to the Cart Page on Interspire Shopping Cart
  2. How to Add an `Edit Product` Link for Interspire Shopping Cart
  3. Preview Hidden Products in Interspire Shopping Cart
Continue reading →

Improve Interspire Shopping Cart Search with Smart Redirections

 Good search results are magical I am always impressed when a website’s search goes where I want and finds what I expect it to. When trying to find a specific product by SKU in Interspire, you will be presented with a search result that shows the product you’re looking for first. But this is not good […] Related posts:
  1. Preview Hidden Products in Interspire Shopping Cart
  2. Add ‘Customers Also Purchased’ to the Cart Page on Interspire Shopping Cart
  3. Interspire Shopping Cart — Add a Brands Drop-Down Menu
Continue reading →

How to Add an `Edit Product` Link for Interspire Shopping Cart

 Why can’t I just click a link to edit the product I’m viewing? Interspire, I love ya, but the Interspire Shopping Cart has some silly omissions. Like a simple “Edit Product” link if you’re logged in as an administrator. Instead, you have to go to the backend, search for the product, then edit it…which takes a […] Related posts:
  1. Preview Hidden Products in Interspire Shopping Cart
  2. Add ‘Customers Also Purchased’ to the Cart Page on Interspire Shopping Cart
  3. Improve Interspire Shopping Cart Search with Smart Redirections
Continue reading →