<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>WPMU DEV Community &#187; Topic: Hide hard coded shopping cart</title>
		<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart</link>
		<description>WPMU DEV Community &#187; Topic: Hide hard coded shopping cart</description>
		<language>en-US</language>
		<pubDate>Wed, 22 May 2013 06:38:55 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://premium.wpmudev.org/forums/search.php</link>
		</textInput>
		<atom:link href="http://premium.wpmudev.org/forums/rss/topic/hide-hard-coded-shopping-cart" rel="self" type="application/rss+xml" />

		<item>
			<title>Arun Basil Lal on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246949</link>
			<pubDate>Mon, 16 Jul 2012 20:50:00 +0000</pubDate>
			<dc:creator>Arun Basil Lal</dc:creator>
			<guid isPermaLink="false">246949@http://premium.wpmudev.org/forums/</guid>
			<description><p>Hey Paul, Thanks for taking care of this :)
</p></description>
		</item>
		<item>
			<title>Paul on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246935</link>
			<pubDate>Mon, 16 Jul 2012 20:23:10 +0000</pubDate>
			<dc:creator>Paul</dc:creator>
			<guid isPermaLink="false">246935@http://premium.wpmudev.org/forums/</guid>
			<description><p>@Atlanta, looks like you have this sorted. Keep in mind that you were providing the error message but posting only a partial set of code to paste bin. It is always easier to have the entire file.
</p></description>
		</item>
		<item>
			<title>Atlanta on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246926</link>
			<pubDate>Mon, 16 Jul 2012 20:03:11 +0000</pubDate>
			<dc:creator>Atlanta</dc:creator>
			<guid isPermaLink="false">246926@http://premium.wpmudev.org/forums/</guid>
			<description><p>Okay, it was )))){
</p></description>
		</item>
		<item>
			<title>Atlanta on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246925</link>
			<pubDate>Mon, 16 Jul 2012 20:00:41 +0000</pubDate>
			<dc:creator>Atlanta</dc:creator>
			<guid isPermaLink="false">246925@http://premium.wpmudev.org/forums/</guid>
			<description><p>Thanks, I still can't get it to work. </p>
<p>If I use<br />
if ((current_user_can('mp_view') &#38;&#38; ( class_exists( 'MarketPress' ) )) {<br />
then I get<br />
unexpected { error message.</p>
<p>If I leave out the { and have 3 )))<br />
then I get<br />
syntax error, unexpected T_VARIABLE in /wp/content/themes/gridmarket/header.php on line 23 error message</p>
<p>If I try 4 )))) instead of 3 then I get<br />
Parse error: syntax error, unexpected '}' in /wp-content/themes/gridmarket/header.php on line 48</p>
<p>Suggestions?
</p></description>
		</item>
		<item>
			<title>Paul on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246912</link>
			<pubDate>Mon, 16 Jul 2012 19:24:03 +0000</pubDate>
			<dc:creator>Paul</dc:creator>
			<guid isPermaLink="false">246912@http://premium.wpmudev.org/forums/</guid>
			<description><p>Sorry. minded should read 'missing'. <a href="http://pastebin.com/F0AHj0Nz" target="_blank">http://pastebin.com/F0AHj0Nz</a>
</p></description>
		</item>
		<item>
			<title>Atlanta on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246910</link>
			<pubDate>Mon, 16 Jul 2012 19:21:59 +0000</pubDate>
			<dc:creator>Atlanta</dc:creator>
			<guid isPermaLink="false">246910@http://premium.wpmudev.org/forums/</guid>
			<description><p>@PaulM </p>
<p><strong> it looks like you minded the opening '{' on the if statement</strong></p>
<p>Sorry, I don't know what minded means. So what is the correct way to do it?
</p></description>
		</item>
		<item>
			<title>Paul on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246907</link>
			<pubDate>Mon, 16 Jul 2012 19:12:04 +0000</pubDate>
			<dc:creator>Paul</dc:creator>
			<guid isPermaLink="false">246907@http://premium.wpmudev.org/forums/</guid>
			<description><p>@Arun, you are correct. There are many options within the WordPress wp-config.php to override some of the default hosting variables.
</p></description>
		</item>
		<item>
			<title>Paul on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246905</link>
			<pubDate>Mon, 16 Jul 2012 19:10:50 +0000</pubDate>
			<dc:creator>Paul</dc:creator>
			<guid isPermaLink="false">246905@http://premium.wpmudev.org/forums/</guid>
			<description><p>@Atlanta, it looks like you minded the opening '{' on the if statement </p>
<p>if ((current_user_can('mp_view') &#38;&#38; ( class_exists( 'MarketPress' ) ))
</p></description>
		</item>
		<item>
			<title>Atlanta on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246866</link>
			<pubDate>Mon, 16 Jul 2012 17:51:40 +0000</pubDate>
			<dc:creator>Atlanta</dc:creator>
			<guid isPermaLink="false">246866@http://premium.wpmudev.org/forums/</guid>
			<description><p>This is the error message from the debug tip</p>
<p>unexpected T_VARIABLE in /mysite.com/wp-content/themes/gridmarket/header.php on line 23</p>
<p>This is my code <a href="http://pastebin.com/NVjmyNFV" target="_blank">http://pastebin.com/NVjmyNFV</a></p>
<p>line 23 is<br />
$settings = get_option('mp_settings');
</p></description>
		</item>
		<item>
			<title>Atlanta on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246854</link>
			<pubDate>Mon, 16 Jul 2012 17:29:48 +0000</pubDate>
			<dc:creator>Atlanta</dc:creator>
			<guid isPermaLink="false">246854@http://premium.wpmudev.org/forums/</guid>
			<description><p>Thanks. @ Arun should it be </p>
<p>&#60;?php if ((current_user_can('mp_view') &#38;&#38; ( class_exists( 'MarketPress' ) ))</p>
<p>or </p>
<p>&#60;?php if ((current_user_can('mp_view') &#38;&#38; ( class_exists( 'MarketPress' ) )){
</p></description>
		</item>
		<item>
			<title>Arun Basil Lal on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246797</link>
			<pubDate>Mon, 16 Jul 2012 14:37:57 +0000</pubDate>
			<dc:creator>Arun Basil Lal</dc:creator>
			<guid isPermaLink="false">246797@http://premium.wpmudev.org/forums/</guid>
			<description><p>Hey @Dean Kaus</p>
<p>Am no super expert on this topic, but you don't have access to php.ini on a shared hosting. But if you do have, that is the way to go I think.</p>
<p>You could try this first: <a href="http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP</a></p>
<p>If that doesn't work, increase it via your cpanel and if you don't have access to editing php.ini, you can contact your host :)
</p></description>
		</item>
		<item>
			<title>Paul on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246727</link>
			<pubDate>Mon, 16 Jul 2012 12:02:06 +0000</pubDate>
			<dc:creator>Paul</dc:creator>
			<guid isPermaLink="false">246727@http://premium.wpmudev.org/forums/</guid>
			<description><p>@Dean Kaus, actually the simpler solution for the white screen is to FTP into your site edit the wp-config.php and enable WP_DEBUG to true.</p>
<p>define('WP_DEBUG', true);</p>
<p>By default this is set yo false and should be set to false on production sites as this will hide PHP warnings and errors. And because these PHP warnings/error are now hidden you get the blank screen. </p>
<p>When you enable the WP_DEBUG you will then be shown the warning/error. It could be the memory limit issue. Of some other programming bug or plugin conflicts.
</p></description>
		</item>
		<item>
			<title>Dean Kaus on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246719</link>
			<pubDate>Mon, 16 Jul 2012 11:16:23 +0000</pubDate>
			<dc:creator>Dean Kaus</dc:creator>
			<guid isPermaLink="false">246719@http://premium.wpmudev.org/forums/</guid>
			<description><p>Hello @Elite Atlanta and @Arun I've discovered through much trial and mostly error that the majority of time when you encounter the white screen of death.  The problem is usually not enough memory allocated from your server.  Depending on which hosting company you have you may be ablel to do this yourself.  </p>
<p>From your Cpanel or virtualmin panel you need to go to php resources and increase the memory there.  I just increased mine to 128 just to avoid having to readjust as my website is closer to completion or if I'm trying out other things.</p>
<p>If you don't see the setting or can't adjust it yourself you can contact your hosting company and have them do it for you.  </p>
<p>I honestly don't recall if you need to make this same adjustment in the php.ininfile or not, I just know that as soon as I increased it on my server all of my white screen issues went away.</p>
<p>Hopw this helps.
</p></description>
		</item>
		<item>
			<title>Arun Basil Lal on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-246714</link>
			<pubDate>Mon, 16 Jul 2012 11:00:48 +0000</pubDate>
			<dc:creator>Arun Basil Lal</dc:creator>
			<guid isPermaLink="false">246714@http://premium.wpmudev.org/forums/</guid>
			<description><p>Hey @Atlanta</p>
<p>Change that to:</p>
<pre><code>&#60;?php endif; ?&#62;
			&#60;div id=&#34;header-wrapper&#34;&#62;
				&#60;div id=&#34;header&#34;&#62;
					&#60;?php if ((current_user_can(&#39;mp_view&#39;) &#38;&#38; ( class_exists( &#39;MarketPress&#39; ) ))
						$settings = get_option(&#39;mp_settings&#39;);
						if (!$settings[&#39;disable_cart&#39;]) {
						?&#62;
									&#60;div id=&#34;cart-contents&#34;&#62;&#60;?php _e( &#39;Cart:&#39;, &#39;framemarket&#39; ) ?&#62; &#60;span&#62;&#60;?php echo sprintf(__(&#39;%s item(s)&#39;, &#39;framemarket&#39; ), mp_items_count_in_cart()); ?&#62;&#60;/span&#62;&#60;/div&#62;
						&#60;div id=&#34;mp-cartsmall&#34;&#62;
									&#60;div id=&#34;toggle&#34;&#62;
								&#60;a id=&#34;open&#34; class=&#34;open button&#34; href=&#34;#&#34;&#62;&#60;?php _e( &#39;View Cart&#39;, &#39;framemarket&#39; ) ?&#62;&#60;/a&#62;

							&#60;a id=&#34;close&#34; style=&#34;display: none;&#34; class=&#34;close button&#34; href=&#34;#&#34;&#62;&#60;?php _e( &#39;Hide Cart&#39;, &#39;framemarket&#39; ) ?&#62;&#60;/a&#62;

							&#60;/div&#62;
						&#60;/div&#62;
						&#60;?php } ?&#62;</code></pre>
<p>Not 100% sure what @PaulM intended, but think it should work.
</p></description>
		</item>
		<item>
			<title>Atlanta on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-245009</link>
			<pubDate>Thu, 12 Jul 2012 01:03:18 +0000</pubDate>
			<dc:creator>Atlanta</dc:creator>
			<guid isPermaLink="false">245009@http://premium.wpmudev.org/forums/</guid>
			<description><p>Paul gave me this solution in live chat today. He said to create a new role with a new capability, eg mp_read and then change header.php in gridmarket to reflect the role's capabilities using user role editor capsman.<br />
He created this pastebin code</p>
<p><a href="http://pastebin.com/WbfSezVa" target="_blank">http://pastebin.com/WbfSezVa</a></p>
<p>The change is from</p>
<p>&#60;?php if ( class_exists( 'MarketPress' ) ) {</p>
<p>to</p>
<p>&#60;?php if ((current_user_can('mp_view') &#38;&#38; ( class_exists( 'MarketPress' ) )) {</p>
<p>I get the white screen of death when I insert the code so I think that I am missing the closing tags or something.. can you tell me what is wrong with the code?
</p></description>
		</item>
		<item>
			<title>3SixtyEvolve on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-243734</link>
			<pubDate>Mon, 09 Jul 2012 19:01:28 +0000</pubDate>
			<dc:creator>3SixtyEvolve</dc:creator>
			<guid isPermaLink="false">243734@http://premium.wpmudev.org/forums/</guid>
			<description><p>Hi @Atlanta</p>
<p>We haven't heard back from you, so I'm hoping you got sorted.</p>
<p>I will go ahead and resolve this topic, but please don't hesitate to reopen it should you still require additional support from us. Just select the 'Mark as Not Resolved (re-open)' box below the post area (otherwise we might miss your new post).</p>
<p>All the best!</p>
<p>Gina
</p></description>
		</item>
		<item>
			<title>Arun Basil Lal on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-238795</link>
			<pubDate>Thu, 28 Jun 2012 03:37:30 +0000</pubDate>
			<dc:creator>Arun Basil Lal</dc:creator>
			<guid isPermaLink="false">238795@http://premium.wpmudev.org/forums/</guid>
			<description><p>Hey Atlanta,</p>
<p>What you are using here is if (current_user_can('read')), which means if the user can just read the blog (which everyone can), he wold see it.</p>
<p>You should be using if (current_user_can('subscriber2')). subscriber2 is only for the current blog, right?</p>
<p>Let me know how that goes. Good luck!
</p></description>
		</item>
		<item>
			<title>Atlanta on "Hide hard coded shopping cart"</title>
			<link>http://premium.wpmudev.org/forums/topic/hide-hard-coded-shopping-cart#post-238785</link>
			<pubDate>Thu, 28 Jun 2012 02:47:38 +0000</pubDate>
			<dc:creator>Atlanta</dc:creator>
			<guid isPermaLink="false">238785@http://premium.wpmudev.org/forums/</guid>
			<description><p>I created a new role subscriber2. It has the identical capabilities of subscriber but I need the differentiation for different plugins to work. </p>
<p>I only want a subscriber2 role of the CURRENT SITE-  to be able to see the Marketpress shopping cart that is hard coded at the top of the framemarket theme because I do not have global cart enabled and it confuses buyers.  I pasted this in to gridmarket's header.php:</p>
<p>&#60;div id="header-wrapper"&#62;<br />
				&#60;div id="header"&#62;<br />
&#60;?php<br />
								if (current_user_can('read'))<br />
								{?&#62;<br />
					&#60;?php if ( class_exists( 'MarketPress' ) ) {</p>
<p>						$settings = get_option('mp_settings');<br />
						if (!$settings['disable_cart']) {<br />
						?&#62;<br />
									&#60;div id="cart-contents"&#62;&#60;?php _e( 'Cart:', 'framemarket' ) ?&#62; &#60;span&#62;&#60;?php echo sprintf(__('%s item(s)', 'framemarket' ), mp_items_count_in_cart()); ?&#62;&#60;/span&#62;&#60;/div&#62;<br />
						&#60;div id="mp-cartsmall"&#62;<br />
									&#60;div id="toggle"&#62;<br />
								<a href="#">&#60;?php _e( 'View Cart', 'framemarket' ) ?&#62;</a></p>
<p>							<a href="#">&#60;?php _e( 'Hide Cart', 'framemarket' ) ?&#62;</a><br />
							&#60;?php<br />
								}?&#62;<br />
							&#60;/div&#62;<br />
						&#60;/div&#62;</p>
<p>1) But subscribers from other blogs can see the cart and I don't want them to unless they are subscribers of the current blog. What code should I be using?<br />
2) it is a paste of code from elsewhere:) Did I insert it the statements properly ?</p>
<p>Thanks!
</p></description>
		</item>

	</channel>
</rss>
