X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Save Multiple Ship-to Addresses Completed (https://forum.x-cart.com/showthread.php?t=12456)

instinctual 03-10-2005 03:50 PM

Wow, yeah, that would be a nice add-on as well. What I've done will just allow you to switch ship-to profiles easily without having to "overwrite" your profile each time you purchase.

It was made for a company that has people ordering and shipping to the same locations all the time, so they just store their shipipng locations in there and I made it so when you login it just redirects you to the modify profile page for you to choose your profile right away.

I've also worked this mod in a way where the entire profile is switchable - not just the ship-to information. That way you can have several people share the same membership level and not worry about overwriting each other's profiles.

Lemme know when you get that done, would love to take a look ;o)

Instinctual
Colorado
X-Cart Versions 3.5.x - 4.0.12

wahrens 03-26-2005 08:40 AM

Did you all have any luck tracking down the sql problem? I'm also getting invalid sql: 1064 in 4.0.5

Thanks for any help,

Bill

dchihorn 04-25-2005 09:33 AM

I am in the process of trying to implement this right now, and just needing a little verification on this step:

Quote:

Then, in this same file, somewhere in the "hidden inputs" or below the regular submit button, add another like this that will show the user the new create saved profile button:

1. Somewhere in teh hidden inputs - could you be more specific, as I am not a coder. I can find the lines that say hidden input, but not sure if i just throw it in there that it wont mess something else up. Could you give a line number suggestion?

2. Then it says add another one like this... does that mean I actually need to copy paste this in this document twice?

instinctual 05-15-2005 06:07 PM

mhmm
 
Hi there, all I'm referring to is that you need to add this code:


Code:

<input type="hidden" name="createAltFunc">

 
After hitting the "submit" button above to save your profile, you can then click on "create saved profile" to save this profile for a later use in the dropdown menu above.


<input type="button" name="create" value="Create Saved Profile" onClick="submitAlternateProfile(document.registerform, 'create')" >


Into the area that already contains the hidden inputs that are built-in to the existing x-cart template - you need to have it in that general area but where EXACTLY you put it is upto you. If you take a look at the screenshot, the code above is what's creating the "creat saved profile" button - which is not standard x-cart design - so where you put it is upto you, just make sure you include the code above somewhere in that template where you'd like the button to show up in the html code.

HWT 07-31-2005 01:52 PM

Followed the instructions to the letter, and I'm getting this error:

Code:

Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d117449933/htdocs/createAlt.php:3) in /homepages/35/d117449933/htdocs/createAlt.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d117449933/htdocs/createAlt.php:3) in /homepages/35/d117449933/htdocs/createAlt.php on line 64


Anyone know what how to fix? Complete newbie to both x-cart and PHP, so please reply as if I'm 2. :) TIA

Dongan 07-31-2005 08:07 PM

Hi,

Please read this thread and will solve your problem...

http://forum.x-cart.com/viewtopic.php?t=20678

techhead 08-01-2005 03:13 PM

Make sure that you only have the php code in the createAlt.php. Remove any other code like:

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>

</body>
</html>


It is also better to use long php tags just in case your server doesn't support short tags...
use:
Code:

<?php // code goes here ?>
instead of:
Code:

<? // code goes here ?>

For more information on the error your getting check out www.php.net

HWT 08-01-2005 03:49 PM

techhead, Thanks for your reply.

I just figured out that what I had was a "whitespace error". I had a couple returns before and after the code, causing the errors. Now that that's solved, I'm getting a javascript error in this:

Code:

{* Borealis Media -  the other half of this is in register.tpl*}
{if $smarty.get.mode eq "update" }
<tr><Td colspan="3" align="center">

{literal}
<script language="JavaScript1.2">

function submitAlternateProfile(obj, func){

  obj.createAltFunc.value = func;
  obj.action = 'createAlt.php';
  obj.submit();
}

</script>
{/literal}

</td></tr>
{/if}
{*/Borealis Media*}


the error is:
Code:

Object doesn't support this property or method

the error is referring to the line:

Code:

obj.action = 'createAlt.php';

I have chmoded createAlt.php to 777 w/ no change. The javascript is in {literal} {/literal} tags in the .tpl

Any ideas?

robin 09-01-2005 11:37 AM

Mulitple ship to addresses
 
Hi,

I just tried to implement the multiple ship to address drop down and it is working.

I was hoping someone could give me suggestion of how to get it to work.

I also get this error

INVALID SQL: 1064 : You have an error in your SQL syntax near 's Goldberg Variations";s:12:"product_type";s:0:"";s:5:"price" ;d:13.99;s:5:"taxes' at line 1
SQL QUERY FAILURE: update xcart_sessions_data set data = 'a:44:{
..... too much to print.

Was a fix made to this?

Actually, I only started getting this error after I made a bunch of changes to the shipping options (added UPS online and other misc changes)

Before i made all of the shipping option changes, I did not get the session error but it still did not work. I did not get anything to appear in the alt shipping address drop down in my profie.


Anyone made any headway on this??

THanks,
Robin

robin 09-01-2005 11:39 AM

CORRECTION to last email
 
:( I meant to say....

I just tried to implement the multiple ship to address drop down and it is NOT working.

Sorry for the quick typo


All times are GMT -8. The time now is 07:06 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.