Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Just want to add another blank on the customer information..


Austin519

Recommended Posts

Currently I want to add two blanks...one for the website they heard about me from, and another for what their username is on that website. For that matter I may even want to add a third, for who referred them. What's the easy way to do this guys before I delve into code? Thanks all!

 

Austin519

Link to comment
Share on other sites

Have a look at the Partita IVA contribution.

Can be found here: http://www.oscommerce.com/community/contributions,1180

 

It's designed for adding a business tax number to the list of 'blanks' that appear when registering an account.

 

I don't think it'd take you too much effort to see the way it works and modify it for what you need to do.

 

Cheers,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

Okay...so let's see how I can put this...I SUCK at sql because I've had no experience with it. Here's his SQL lines:

 

ALTER TABLE address_book ADD entry_piva varchar(16) NOT NULL default 'AFTER entry_company;



ALTER TABLE orders ADD billing_piva VARCHAR( 16 ) AFTER billing_company;



INSERT INTO configuration VALUES (136, 'Partita IVA', 'ACCOUNT_PIVA', 'true', 'Decidi se mostrare il campo Partita Iva', 5, 1, NULL, '2003-06-01 17:41:12', NULL, 'tep_cfg_select_option(array('true', 'false'),');

 

The first two, are easy, I know/ He's just adding two entries in the table...I would of course need to do the same for whatever I wanted to call mine, i.e. website_address, website_username, and referrer. It's the third line that I don't know what to translate it into.

 

Once I figure that out the rest is cake...there must be a contribution regarding this...if not I'll write one...

 

Austin519

Link to comment
Share on other sites

The last one is basically a configuration option that goes in 'Admin >> Configuration >> Customer Details' to give you the option of what fields you would like displayed to the customer.

 

You can name this field anything you like... as per these examples.

INSERT INTO configuration VALUES ('', 'Website Address', 'WEBSITE_ADDRESS', 'true', 'Display website address in the customers account', 5, 1, NULL, '', NULL, 'tep_cfg_select_option(array('true', 'false'),');



INSERT INTO configuration VALUES ('', 'Website Username', 'WEBSITE_USERNAME', 'true', 'Display website username in the customers account', 5, 1, NULL, '', NULL, 'tep_cfg_select_option(array('true', 'false'),');

 

Then, as you have already mentioned, will need to use the appropriate WEBSITE_ADDRESS, WEBSITE_USERNAME for each different field you're going to display.

 

HTH,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

TB:

Hmmm...I would like to allow the customer to list any website and his/her username on each one...but of course I don't want a million blanks. I would prefer them to be able to add them at will. Any easy way to do this?

 

Assuming the above is rather difficult to do (forgive me, php newbie trying to learn)...then my next choice would be to just add one blank. So all I would need to do is add forum_address and forum_username to the customers table. Those are the two "alter table" requests? And the "insert into" allows me to do what? Decide whether or not I want to display this feature?

 

Aside from these three items what all do I have to edit? Everything as listed in his file with my information replaced?

 

Thanks guys,

Austin519

Link to comment
Share on other sites

As per my previous post, the INSERT into CONFIGURATION SQL statement gives you the ability to switch the fields on / off from the admin interface.

 

Click on my 'WWW' button below, and then select 'Create a Profile'. You will see the extra 'Company ABN' field I put there.

Just so I know we're on the right wave length, is this the type of 'blank' you're looking to create?

If so, than follow through the contribution (Partia IVA) and just double (for two fields, triple for three, etc) everything is says to do, remembering to rename the fields individual names.

 

HTH,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

TB:

Yep, that's exactly right, exactly what O wamt. I've added a customers_forum_address and customers_forum_username to the customers table. I have also used the two inserts below for forum_address and forum_username. Is this so far correct? And then just do the rest of the code stuff?

 

Austin519

Link to comment
Share on other sites

That's it... you just need to do the code stuff and you're set!

 

I recommend doing one at a time, that way you know where faults/problems (hopefully none) are if you come across any along the way.

 

Cheers,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

TB:

So this looks good for the alter table I assume...

 

ALTER TABLE orders ADD forums_address VARCHAR( 32 ) AFTER customers_email_address;

ALTER TABLE orders ADD forums_username VARCHAR( 32 ) AFTER forums_address ;

ALTER TABLE customers ADD forums_address VARCHAR( 32 ) AFTER customers_email_address ;

ALTER TABLE customers ADD forums_username VARCHAR( 32 ) AFTER forums_address ;

 

I say only these and not the address_book because this shouldn't be tied to their address...it should solely be part of their contact info and order info. If I do this, then what do I go about doing for the rest of the coding? Sorry about all the questions...I am also going to look at the rest of the code modifications now.

 

Austin519

Link to comment
Share on other sites

TB:

I think this may completely change the instructions Tony and would appreciate some help. I think it actually may be easier to do than the PIVA one...because it only really needs to show up on the order and those pages...that's really about it...

 

Austin519

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...