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)

alecgraz 10-13-2005 09:23 AM

I love the idea of this mod. In looking over the code, I am confused as to where $alt_profiles gets populated. Maybe I am missing something obvious but it seems like no profiles would get displayed. Any insight would be appriciated
Thanks

instinctual 10-13-2005 10:56 AM

alt_profiles doesn't get written to - that's not a table - it's mentioned in the code in spots as that's what we were calling it when we developed it. We have variable names called that, but otherwise data gets written to xcart_shipping_addresses table.

All of that logic is in createalt.php...

alecgraz 10-13-2005 12:13 PM

Thanks for the reply. I guess I didnt explain my question well enough. In the register_switch_profile.tpl you list out all the profiles in the select box via a loop over all the profiles for that user.

{section name=switchProfile loop=$alt_profiles}

I don't see where you are assigning this data from the PHP to the template. createAlt.php handles the creation, deletion, and switching. But I dont see it handling the population of the data to be displayed in the drop downs.

Thanks!

instinctual 10-13-2005 02:38 PM

ah, that's handled in the javascript that I have in register_contact_info.tpl - one of my last snippets of code there.

JGrubbs 11-28-2005 06:36 AM

I have installed this mod but it doesn't seem to be working right.

When I click on register as a new user the "Create Saved Profile" button is on the page, but doesn't do anything. It will work when I click on the "Modify profile" link because it is passing through mode=update, but it doesn't appear to be saving a profile to the drop down list. I checked the database and see a new entry in xcart_shipping_addresses for every time I pressed the "Create Saved Profile" button, but still nothing showing in the dropdown list:

http://www.strangdirect.com/xcart/register.php

instinctual 11-30-2005 12:30 PM

first - if installed right, this should not be showing up until you've actually already registered and created a profile with user/pass. It needs to be surrounded with some if/then tags that it looks like you missed.

Once you've then logged in after registering for the first time, you will then see a dropdown list that will populate with alternate profiles as they are created. Keep in mind you have to create the first profile and use the regular x-cart submit button, and then can click the "create saved profile" button to copy that profile so that you can enter a new one, save, copy, enter new one, save, copy, etc.

JGrubbs 11-30-2005 12:37 PM

The drop down list is not showing up untill after the registration is complete, the button is showing up but does not do anything even after the registration, unless you first click on modify profile.

Dorette 12-09-2005 10:13 AM

Great Mod, I installed it but have a little hitch

I am able to modify profile and then submit, but when I come back to add the profile it does not add up to the drop down list and I still have no alternative profiles,

i guess I am not able to add the profile , how do I check for that

Jon 01-11-2006 11:17 AM

Re: Mulitple ship to addresses
 
Quote:

Originally Posted by robin
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:


This occurs because the sessions are completely regenerated, which means re-establishing your cart contents.

If one of your cart contents has an apostrophe or quote in it, then it will cause the SQL to break.

To fix this find:

Code:

$new[$key] = $value;

Replace with:

Code:

$new[$key] = addslashes($value);

electronics4less 02-01-2006 01:09 PM

I do not get any errors but it is not saving the addresses.

Any ideas?


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

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