| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Save Multiple Ship-to Addresses Completed | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Save Multiple Ship-to Addresses Completed
Hi all, I've got this mod done and thought I'd share it - allows you to save multiple ship-to addresses on the profile page.
It creates a nice drop-down menu to choose your profile from, and allows you to switch, add, and delete profiles. Once you've got it going - realize that you have to save your profile the regular x-cart way, and once it's saved you can then hit "create saved profile" to save a copy of it later. Then, modify your profile, click the regular submit to save it, and then click on the "create saved profile" - this will keep adding to the profiles available to "switch to". First, you need to create a php file called createAlt.php and put it in your root directory: Code:
Second, you will need to create a new table in the mysql database - you can use this dump file I created: Code:
Also, alter the customers table like so (thanks techhead): Code:
Third, you will need to modify and create some .tpl files: Create a new .tpl file and put it in the skin1/main folder and call it register_switch_profile.tpl - here is the code: Code:
Now create another new .tpl file called register_delete_altprofile.tpl and put it in this same spot. Code:
Now modify skin1/customer/main/register.tpl - adding this into your chosen location depending on where you want it to showup in the form: Code:
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: Code:
Ok, now last step - modify one of the "register" .tpl's in the skin1/main folder to add this - I've put mine in the register_contact_info.tpl but it doesn't matter which you put it in. Code:
Cheers, hope you all find some use of this mod, took me awhile ;o) BTW - I've got it working on both the 3.5.x branch and the 4.0.x branch. Instinctual Colorado X-Cart Versions 3.5.x - 4.0.x |
|||||||
#2
|
|||||||
|
|||||||
this looks like just what I'm after... but I'm having a little bit of trouble getting it up and going on 4.0.12.
first I think you missed the following database change: Code:
secondly... I now get a sql error when I try and add a new profile along the lines of Code:
any ideas
__________________
xcart v3.5.8 through to v4.0.14 redhat v9 php v4.3.10 MySQL 4.0.22 |
|||||||
#3
|
|||||||
|
|||||||
Any chance of an link to an example?
It sounds interesting but I am not entirely sure what exactly it does
__________________
X-Cart Gold 4.0.12 X-AOM, X-RMA, X-FancyCat Apache/Linux Server PHP 4.3.8 |
|||||||
#4
|
|||||||
|
|||||||
Unfortunately where I have this working is password-protected shopping only. However, I've taken a screenshot of the profile page so that you can all see what it does:
http://www.borealismedia.com/multi-ship.jpg ) Cheers - - - techhead I'm checking out your errors right now... Instinctual Colorado X-Cart Versions 3.5.x - 4.0.x |
|||||||
#5
|
|||||||
|
|||||||
Techhead - - I'm running this on version 4.0.9 -= the error you're getting seems to be with altering the session - around this line in my code:
// now update the session Have you checked that .12 still stores sessions in this same table and fields? Can you paste the rest of the error so I can take a look at it? Thanks - Instinctual Colorado X-Cart Versions 3.5.x - 4.0.x |
|||||||
#6
|
|||||||
|
|||||||
Can't see the screen shot
__________________
X-Cart Gold 4.0.12 X-AOM, X-RMA, X-FancyCat Apache/Linux Server PHP 4.3.8 |
|||||||
#7
|
|||||||
|
|||||||
Never mind... yes I can just took a while to download
Looks good, think this will go on my 'todo' pile!
__________________
X-Cart Gold 4.0.12 X-AOM, X-RMA, X-FancyCat Apache/Linux Server PHP 4.3.8 |
|||||||
#8
|
|||||||
|
|||||||
really? Weird, shows up here for me...
Prolly just taking awhile to load... Cheers! Instinctual Colorado X-Cart Versions 3.5.x - 4.0.x |
|||||||
#9
|
|||||||||
|
|||||||||
That's a sweet little mod that one, kudos instinctual!
__________________
Groovico Used by X-carters the world over: Marketing Manager Pro Bundle For X-cart Featured Product Manager for X-cart Feed manager pro for X-cart http://www.firetanksoftware.com Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X |
|||||||||
#10
|
|||||||
|
|||||||
I've got a client looking over our dev shopping cart at the moment so I wont be able to get the error to you awhile. You're right though, it has to do with the data being (or trying to be) stored in the database.
What you've done looks like you can only select one shipping destination for the cart What I'm after would be to hack this to allow customers to select different shipping destinations for each product. So if a customer buys 5 copys of the Java Book, the customer can send 2 copies to Peter, 1 copy to Paul, and the other 2 copies to Mary. Tax isn't going to be an issue as it will all be in the same tax zone, however shipping destinations/charges will come into it.
__________________
xcart v3.5.8 through to v4.0.14 redhat v9 php v4.3.10 MySQL 4.0.22 |
|||||||
|
|||
X-Cart forums © 2001-2020
|