Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Adding Content to Cart Page
Author « Topic »  

TastelessApple
Advanced Member

USA
499 Posts

Pre-sales questions only
(More Details...)

Posted - 03/04/2022 :  12:10:55  
Hello,

I would like to add some content to the cart.php page, but would like the content to change or be removed depending on which stage of checkout the customer is in. Is there an easy way to add in an if statement to target a particular stage? Right now I'd like to target stages 1 and 2.

Thanks,
Josiah

Vince
Administrator

42874 Posts

Posted - 03/04/2022 :  12:50:47  
Hi Josiah
Sure, you can set the parameters...

$xxCoStp1="Step 1 content";
$xxCoStp2="Step 2 content";
$xxCoStp3="Step 3 content";

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

midvalleydrifter001
Ecommerce Template Expert

USA
936 Posts

Posted - 03/04/2022 :  13:21:37  
You will want to style it also so add this to your style.css sheet

Adjust to fit your needs.

/*Checkout steps on cart pages*/
div.checkoutsteps {
text-align: center;
font-weight: bold;
font-size:1.2em;
padding-bottom: 5px;
padding-top: 5px;
margin-bottom: 8px;
border: 1px solid gray;
background-color: #005A9E;
color: #FFFFFF;
}


Patrick

TastelessApple
Advanced Member

USA
499 Posts

Pre-sales questions only
(More Details...)

Posted - 03/04/2022 :  14:01:52  
Thank you Vince and Patrick.

Vince, where do I need to set those parameters? I've put them on the cart page but that didn't automatically get results. Do I need to "echo" them somehow? Also, I'm wanting to add php code to the content. Could I do an if statement like:
<?php if($xxCoStp1 == $active) { content here } ?>

Thanks,
Josiah

midvalleydrifter001
Ecommerce Template Expert

USA
936 Posts

Posted - 03/04/2022 :  14:10:11  
Those go in your includes.php file

$xxCoStp1="Step 1 content";
$xxCoStp2="Step 2 content";
$xxCoStp3="Step 3 content";

TastelessApple
Advanced Member

USA
499 Posts

Pre-sales questions only
(More Details...)

Posted - 03/05/2022 :  20:00:43  
Would there be a way to add some php code inside that?

It doesn't seem to be working.

TastelessApple
Advanced Member

USA
499 Posts

Pre-sales questions only
(More Details...)

Posted - 03/05/2022 :  20:07:29  
Also, I would need the addition of content to be at the bottom of the page, not the top.

Any ideas? The bulk of what I need to do is add some products to cart page, but they need to not be there once the customer is entering payment info...

Thanks

TastelessApple
Advanced Member

USA
499 Posts

Pre-sales questions only
(More Details...)

Posted - 03/08/2022 :  14:27:40  
Any ideas for me?

To recap, I need to add some php contect to the bottom of the cart page but only in the first and second stages of checkout.

Thank you,
Josiah

Brazos Graphics
Building and Designing Custom Websites.
http://www.brazosgraphics.com

Vince
Administrator

42874 Posts

Posted - 03/10/2022 :  02:59:34  
quote:
Any ideas? The bulk of what I need to do is add some products to cart page, but they need to not be there once the customer is entering payment info...
This is pretty much what the Cross Selling features are designed to do. More here...
https://www.ecommercetemplates.com/ectstore/cross-selling.asp
But there isn't an automated way to add text below the cart, and if you really want to add code to your content then in the cart.php page itself, above and / or below the inccart.php include line you can use this to detect the checkout steps...

<?php

if(getpost('mode')!='checkout'&&getpost('mode')!='go'){
// Your PHP code here which will only appear on the first checkout step
}

?>

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000