Changing default user information in webshop *NOOB*

Author Message

hersnab bottle

Wednesday 22 August 2007 10:49:07 am

Hi,
I run a small family business and decided to set up an ez publish installation to sell my products online. I didn't know what I was letting myself in for. I am an amateur at this but have managed to plod through so far learning alot aboout the ez publish system and such. I have most of my content ready and paypal is intergrated and working. I have one thing bugging me though. I only sell to UK mainland customers so I used an override and edited the userregister.tpl to change the labels 'zip' to 'post code', 'state' to 'county' etc. These are just cosmetic changes however. How do I change the datatypes so 'zip' becomes 'post code' throughout the ordering system? So when the order summary comes up it say:
Post Code:yourpostcode and not Zip:yourpostcode. I want the data to be saved as and sent to paypal as 'post code' not 'zip'.

I would also like to highlight United Kingdom as the default country choice. I have done this for users registering for the site but not if they want to buy something. Ideally I'd have the United Kingdom set as default throughout the site and get rid of the option all together from the page. I tried deleting the entry on the override for userregister.tpl but it came back with errors when a purchase was put through that some information was missing.

Sorry this is such a noob style question but I'm finding it difficult to find the right information I need to continue.
Thanks.

kracker (the)

Wednesday 22 August 2007 8:41:50 pm

Hello hersnab and welcome to the eZ Community!

The shop module in eZ Publish has a lot of features, yet most tend to customize it to meet their own needs as a separate module extension.

I might recommend more study of the shop module's php code, datatypes (in general) and template overrides.

In some of the cases you mention you are changing templates without changing the php code which drives them which in turn presents the errors upon submission.

It sounds like your driven to reach your goals, I urge you to continue forward, all that you wish to do is possible with the right amount of work.

This thread is loosely related, <i>http://ez.no/community/forum/developer/register_or_customer_why_not_both/</i>

Cheers,
<i>//kracker

Mansbestfriend : Poly.sci.187 : allieverwanted ... (was a place to call home)</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

hersnab bottle

Thursday 23 August 2007 5:18:48 am

Hi Kraker
Thanks for the swift response. I am determined for this to work for me and it does. Its just a cosmetic thing really. To me it doesn't matter. I know 'zip' means 'postcode' so it only needs to be visable to the customer on the order registration page and order confirmation page. However I would like the whole system to accept these fields.

I've been looking at these files:

ezshopaccounthandler.php
ezshopoperationcollection.php
ezshopfunction.php

All these reference what I wish to change. Do I have to change all these or is there something I can do to change these throughout the whole system in one go?

I've been searching for a way to make the country selection redundant (as I only sell to the UK) and in another thread I saw someone mention just commenting out all references to country. Is that a good idea?

I also found this thread

http://ez.no/community/forum/install_configuration/country_selected/re_country_selected

But I can't seem to get this to work I've followed the info but to no avail. All I manage is getting United Kingdom to the top of the list but not selected by default.
I'm unsure as to where to put the default_val='United Kingdom' default_desc='United Kingdom' in the file:
design/standard/templates/content/datatype/edit/ezcountry.tpl

Thanks again Steve.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.