Post by Heilong » Wed Nov 19, 2008 10:34 am

Hi everyone,

When a user registers by default he is asked to input personal informations, address informations, password... under the admin panel when I check the client I can see only personal information and password.
I want to know how to display all the information, especially the address information then we can see all the information in only one page.

is there any way to do it ?

Thanks for your help,

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm

Post by lev » Thu Nov 20, 2008 1:28 pm

You could always modify the customer control, template and language page to pull in the addresses listed under a customer. PM if you need help but are willing to do the work.

lev
New member

Posts

Joined
Wed Apr 30, 2008 10:47 pm

Post by lev » Fri Nov 21, 2008 7:37 am

Heilong,

As per your request (and its a good idea), I made the change to the customer admin page to display the addresses on file. Nothing fancy here, just the basics.
Let me know if this gets you going.

Attachments

Last edited by lev on Sat Nov 22, 2008 3:23 am, edited 1 time in total.

lev
New member

Posts

Joined
Wed Apr 30, 2008 10:47 pm

Post by jty » Sun Nov 23, 2008 6:17 am

Thanks Lev, I got it going on RC4
I love the way you've included orders on the bottom but ..........
I added your code manually as I am now on RC4 and there are some minor changes
a) $request->get( is now $request->gethtml(
b) .... I forgot b). Maybe there wasn't a b)

The biggy is that you've left your donation mod in the orders section on the bottom

I haven't done a proper test of this contribution but I'll post back if anything is broken
Thanks for your work.
Last edited by jty on Sun Nov 23, 2008 6:33 am, edited 1 time in total.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by fogma » Sun Nov 23, 2008 6:36 am

maybe b) was....

admin\controller\customer.php line 159 -> There is an extra 'e' on "firstnamee" perhaps?

Other than that, it works for me... like the list of orders :-)

Gary

New member

Posts

Joined
Wed Aug 13, 2008 4:16 am

Post by Heilong » Mon Nov 24, 2008 10:27 am

Yes,

It's working good and just a data is missing the "company name".

I also like the order details in the bottom :)

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm

Post by Heilong » Mon Nov 24, 2008 11:02 am

For the company we just need to add in customer.tpl this code

Code: Select all

<tr>
  <td>Company</td>
  <td style="padding-left:10px;" colspan="3"><?php echo $address['company']; ?></td>										  
</tr>
Which actually add a new line to the table displayed for customer addresses.

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm

Post by lev » Wed Nov 26, 2008 10:43 am

Sorry about the sloppyness guys.. I do most things in a rush (customers always want a jet rocket and are only willing to pay for a box of matches). Please feel free to modify, improve and change.
BTW i'm working with v0.7.7.

Hey if anyone is interested, I wrote a little SEO code that lets you set title, keywords and description (for meta tags) through a admin panel menu. it has a lot of hard coded stuff (Parent Level Items and Sub Level Queries) but if someone thinks they have the time to improve it, I can certainly share that :)

Its not written well enough to be a contribution, but its a great start and just needs a little love and attention.

lev
New member

Posts

Joined
Wed Apr 30, 2008 10:47 pm

Post by jty » Wed Nov 26, 2008 7:32 pm

lev wrote: Sorry about the sloppyness guys..
Please don't apologise. I am grateful for any bit of code. I only posted my comments so others coming later, who may be new to all this, don't get confused.
(customers always want a jet rocket and are only willing to pay for a box of matches).
Actually, we don't even pay for a box of matches. It's free and we can't ask for our money back because we never paid. LOL.
I wrote a little SEO code that lets you set title, keywords and description (for meta tags) through a admin panel menu. it has a lot of hard coded stuff (Parent Level Items and Sub Level Queries)
I haven't got time to check it out this side of the year but if you attach the files here, I'll see if I have time in January to have a look
Having said that, there's talk that meta tags will be in 0.8

What I'm really after is a URL alias generator that eliminates multiple URLs for the same page
With the SEO contrib, if I have a product belonging to a subcategory that is 3 levels deep, I end up with 4 URL ways to access that product page. I don't think this is google-wise

It's something on my to-do-when-I-feel-like-thinking list. The answer may be in modding the SEO Contrib but that's too much thinking for now.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Qphoria » Wed Nov 26, 2008 8:09 pm

jty wrote: What I'm really after is a URL alias generator that eliminates multiple URLs for the same page
With the SEO contrib, if I have a product belonging to a subcategory that is 3 levels deep, I end up with 4 URL ways to access that product page. I don't think this is google-wise
Erm.... http://forum.opencart.com/index.php/top ... l#msg11672
bi-polar?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jty » Wed Nov 26, 2008 8:18 pm

Qphoria wrote: bi-polar?
Is that two polar bears.

That other thread is about "breadcrumbs" for users
I'm after url alias for Google
The product and category links can still point to the same URL alias for Google
I don't care about the breadcrumbs but I do care that Google does not penalise me for duplicate content because I have multiple URLs to the same page.
I can fix it manually in the URL alias table but I'd need to fix the URL alias table everytime I added/changed anything in products/categories. That is not economically feasible.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Qphoria » Wed Nov 26, 2008 10:23 pm

You mean you are getting:
index?controller=cart     /cart
index?controller=cart     /cart

the exact same way twice in your url alias page?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jty » Wed Nov 26, 2008 11:08 pm

No, not duplicate entries in the URL alias table. Plus, I'm going to exclude the entries for things like cart and account in the robots.txt for search engines anyway.

In a simple example, what I mean is that I have a product1 which belongs to a category1
With the way open cart works and hence URL alias as generated by the SEO contrib, I end up with URLs of:
1. product.html
2. category1/product1.html
Both leading to the same content

For a user, this doesn't matter, they end up in the same location.
But wouldn't Google see this as duplicate content?
It's a similar issue to the canonical issue where http:mydomain.com/product1 is a different URL to http:www.mydomain.com/product1 so it's best to choose one and eliminate the other in the htaccess file.

My example above is a simple Open Cart set-up but if I assign that product to more than one category (and maybe a subcategory), I now get lots of multiple URLs going to the same content page.

What I need to do is somehow point my URL alias table like:

controller=product&product_id=1 => category1/subcat1/product1.html
controller=product&path=1&product_id=1  => category1/subcat1/product1.html
controller=product&path=1_2&product_id=1 => category1/subcat1/product1.html

So now I have only one URL for that page and no duplicate content problem in the eyes of google
I think that's how it goes but I need to do more thinking on this one. I haven't properly checked it out yet.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Qphoria » Wed Nov 26, 2008 11:11 pm

Yea, The breadcrumb and seo duplicate is the same issue.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jty » Wed Nov 26, 2008 11:17 pm

Qphoria wrote: Yea, The breadcrumb and seo duplicate is the same issue.
OIC, now I know what you mean by what you said that I misunderstood to be what you mean cos I don't know enough about the more techo stuff to understand what is meant by what you mean  :o

If I could somehow change the SEO generator to make the URLs the same like my example above, then the problem would be solved for me with the use of URL alias
I had a quick play and got it a bit working but ended up with duplicate rows. It fixed the duplicate URLs but then it duplicated the entries in the table. Then I lost interest in it and haven't come back to take another look since.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by nextgenxx » Thu Dec 11, 2008 9:00 am

I got this customer address admin installed and seems to work. (Thanks Lev) My question is that the state in the address area does not show up.

It looks like this:

Bill To/ Ship To:  John  Doe
Address:                 1500 West Mountain Dr.

                        City PostCode Country

There is no "State" after City. How can I get the city to pull from the DB and put on the customer admin client panel?

User avatar
New member

Posts

Joined
Tue Jul 15, 2008 1:13 am


Post by jty » Sat Dec 13, 2008 12:16 am

I think there is a tiny little bug in this contrib

Here it's calling for the geo zone

Code: Select all

$address_info = $database->getRows("SELECT a.address_id, a.company, a.firstname, a.lastname, a.address_1, a.address_2, a.postcode, a.city,c.name,c.iso_code_3 as country FROM address a left join [color=red]geo_zone gz on a.zone_id = gz.geo_zone_id[/color] left join country c on a.country_id = c.country_id where customer_id='" . (int)$request->get('customer_id') . "'");
I changed it to

Code: Select all

$address_info = $database->getRows("SELECT a.address_id, a.company, a.firstname, a.lastname, a.address_1, a.address_2, a.postcode, a.city, c.name, c.name as country, [color=red]z.name as state[/color] FROM address a left join [color=red]zone z on a.zone_id = z.zone_id[/color] left join country c on a.country_id = c.country_id where customer_id='" . (int)$request->get('customer_id') . "'");
Then call it up in the customer.tpl liek this

Code: Select all

<td style="padding-left:10px;"><?php echo $address['city']; ?></td>
<td style="padding-left:5px;">[color=red]<?php echo $address['state']; ?>[/color]</td>
<td style="padding-left:5px;"><?php echo $address['postcode']; ?></td>
This is NOT cut 'n paste code. Follow what I've posted with a thinking mind.
It was too long ago for me to remember exactly

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by lev » Sat Dec 13, 2008 3:42 am

ahha.. good one. didn't even notice it until nextgenxx mentioned it.

lev
New member

Posts

Joined
Wed Apr 30, 2008 10:47 pm

Post by nextgenxx » Sat Dec 13, 2008 4:15 am

I am no expert with php, wish I was, just a designer. I have tried this morning and no luck my thinking mind.

Code: Select all

//$address_info = $database->getRows("SELECT a.address_id, a.company, a.firstname, a.lastname, a.address_1, a.address_2, a.postcode, a.city, c.name, c.iso_code_3 as country FROM address a left join geo_zone gz on a.zone_id = gz.geo_zone_id left join country c on a.country_id = c.country_id where customer_id='" . (int)$request->get('customer_id') . "'");
			
$address_info = $database->getRows("SELECT a.address_id, a.company, a.firstname, a.lastname, a.address_1, a.address_2, a.postcode, a.city, c.name, c.name as country, z.name as state FROM address a left join zone z on a.zone_id = z.zone_id left join country c on a.country_id = c.country_id where customer_id='" . (int)$request->get('customer_id') . "'");
Those are the lines I am trying to change.

User avatar
New member

Posts

Joined
Tue Jul 15, 2008 1:13 am


Post by lev » Sat Dec 13, 2008 11:18 am

jty wrote:
Then call it up in the customer.tpl liek this

Code: Select all

<td style="padding-left:10px;"><?php echo $address['city']; ?></td>
<td style="padding-left:5px;">[color=red]<?php echo $address['state']; ?>[/color]</td>
<td style="padding-left:5px;"><?php echo $address['postcode']; ?></td>
This is NOT cut 'n paste code. Follow what I've posted with a thinking mind.
It was too long ago for me to remember exactly

lev
New member

Posts

Joined
Wed Apr 30, 2008 10:47 pm
Who is online

Users browsing this forum: No registered users and 7 guests