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
 Cart checkout steps question
Author « Topic »  

tgorski
Ecommerce Template Expert

USA
916 Posts

Posted - 12/09/2024 :  12:03:35  
Hello,
On step 2/3, I am wondering if there is a way to make the "I'd like this shipped to a different address?" button to show the fields OPEN by default instead of having to click the button to open that section?

Tim Gorski

Phil
ECT Moderator

United Kingdom
7686 Posts

Posted - 12/10/2024 :  01:22:49  
Hi Tim,

Edit cart.php in notepad and add the following line below jist before <?php include "vsadmin/inc/inccart.php" ?>

so it looks like this:

<?php
session_start();
if (!isset($_SESSION['country'])) { $_SESSION['country']='United States of America'; }
?>

<?php include "vsadmin/inc/inccart.php" ?>




*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

tgorski
Ecommerce Template Expert

USA
916 Posts

Posted - 12/10/2024 :  04:22:20  
I added that code and it didn't change anything. The site is shopswiss.com ... Please advise?

Tim Gorski

Phil
ECT Moderator

United Kingdom
7686 Posts

Posted - 12/10/2024 :  08:40:15  
Apologies Tim I completely misunderstood/misread your request.

Now I've read your post again I see you're asking for the alternative ship address form fields to reveal.

Sorry I can't help you on that



*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Edited by - Phil on 12/10/2024 08:40:37

dbdave
ECT Moderator

USA
10427 Posts

Posted - 12/10/2024 :  09:14:04  
I think I did this before with javascript, which is (I think) the language used to trigger that.
I'll see if I have anything in my bag of tricks. (I'll take a look this evening)

David

tgorski
Ecommerce Template Expert

USA
916 Posts

Posted - 12/10/2024 :  09:51:34  
Thanks Dave!

Tim Gorski

dbdave
ECT Moderator

USA
10427 Posts

Posted - 12/11/2024 :  18:05:27  
Sorry for the delay.
This was acutually an easy one - I've just been busy.
In your cart.php page, in the bottom of the page, before the closing </body> tag use this...

<script>
if (document.getElementById("shipdiff")){document.getElementById("shipdiff").value = "1";}//forces open alternate ship fields
</script>


I tested to be sure it works.
For anyone who needs this, it works for .asp and .php

If you want to force the country selection of United States, add a line to that so it's this...

<script>
if (document.getElementById("scountry")){document.getElementById("scountry").value = "1";}//forces country to US for ship fields
if (document.getElementById("shipdiff")){document.getElementById("shipdiff").value = "1";}//forces open alternate ship fields
</script>


David

Edited by - dbdave on 12/11/2024 18:08:38

tgorski
Ecommerce Template Expert

USA
916 Posts

Posted - 12/11/2024 :  23:04:33  
Thats awesome... thanks so much!

Tim Gorski

dbdave
ECT Moderator

USA
10427 Posts

Posted - 12/12/2024 :  08:21:43  
  « 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