Jump to content

Displaying boxes (shopping cart, etc) on certain pages


Guest

Recommended Posts

I have searched around and couldn't find anything in the forums, my apologies if someone else has started a similar topic.

I am currently building a brochure type site, that has a Cube Cart online store as an "extra feature".

Ideally I would like to be able to show the product page (viewProd.tpl) as just the product information (text and images, etc) with a buy/checkout button without the shopping cart/information box(es) being visible.

These boxes remaining visible on other store pages as required. Anyone got any ideas?

Link to comment
Share on other sites

includes/boxes/shoppingCart.inc.php

REPLACE $box_content = $box_content->text("shopping_cart"); with

if (stristr($_SERVER['QUERY_STRING'], "viewProd") !== false) {

	$box_content = "";

} else {

	$box_content = $box_content->text("shopping_cart");

}

Link to comment
Share on other sites

Thanks for that Convict. I managed to work out another way of acheiving this.

In the main index.php, just before the final parse call, i put in this

// SHOP_BAR

if(!isset($_GET['act']) || $_GET['act']!="viewProd") {

	 $body->parse("body.shop_bar");

}




And then put the folloiwing into {VAL_SKIN}/styleTemplates/global/index.tpl




<!-- BEGIN: shop_bar -->

<div id="shopBar">

	 {SHOPPING_CART}

</div>

<!-- END: shop_bar -->

That pretty much does the job. Obviously i had to change some of the css so that fixed sizes werent used for the class .boxContent. This was to ensure that on any pages where i didnt want the shopping cart box to be shown, the rest of the page content flowed in a way that filled the space wher the shopping cart box would have been.

Link to comment
Share on other sites

Thanks for that Convict. I managed to work out another way of acheiving this.

In the main index.php, just before the final parse call, i put in this

// SHOP_BAR

if(!isset($_GET['act']) || $_GET['act']!="viewProd") {

	 $body->parse("body.shop_bar");

}




And then put the folloiwing into {VAL_SKIN}/styleTemplates/global/index.tpl




<!-- BEGIN: shop_bar -->

<div id="shopBar">

	 {SHOPPING_CART}

</div>

<!-- END: shop_bar -->

That pretty much does the job. Obviously i had to change some of the css so that fixed sizes werent used for the class .boxContent. This was to ensure that on any pages where i didnt want the shopping cart box to be shown, the rest of the page content flowed in a way that filled the space wher the shopping cart box would have been.

Well, my code is for standard CubeCart skins (fixed box size), own skin used just different solution ia required. :unsure:
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...