Post by james101 » Fri Apr 15, 2011 9:56 pm

Can anyone tell me how to remove the address from the register form on this template?

http://www.opencartstore.com/index.php? ... duct_id=84

On my store i will be selling digital downloads so there is no need for the address fields. Im not the best with thit code so could you pleases tell me what code i remove and what file(s) i remove it from.

Thank you James.

New member

Posts

Joined
Tue Apr 05, 2011 10:14 pm

Post by florinsith » Sat Apr 16, 2011 3:03 am

To make it faster , you should use the search .
Here it is http://forum.opencart.com/viewtopic.php?f=20&t=28523
All the respect!

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by james101 » Sat Apr 16, 2011 7:45 am

florinsith wrote:To make it faster , you should use the search .
Here it is http://forum.opencart.com/viewtopic.php?f=20&t=28523
All the respect!
That was tha 1st think i looked at but the code is not the same as in my template.

Thanks James.

New member

Posts

Joined
Tue Apr 05, 2011 10:14 pm

Post by florinsith » Sat Apr 16, 2011 3:44 pm

Well , post your create.tpl , and lets see.
All the respect!

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by james101 » Sat Apr 16, 2011 8:50 pm

florinsith wrote:Well , post your create.tpl , and lets see.
All the respect!
Hi florinsith here is the code from the create.tpl file

Code: Select all

          <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_confirm; ?></td>
            <td><input type="password" name="confirm" value="<?php echo $confirm; ?>" />
              <?php if ($error_confirm) { ?>
              <span class="error"><?php echo $error_confirm; ?></span>
              <?php } ?></td>
          </tr>
        </table>
      </div>
      <b style="margin-bottom: 2px; display: block;"><?php echo $text_newsletter; ?></b>
      <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <table>
          <tr>
            <td width="150"><?php echo $entry_newsletter; ?></td>
            <td><?php if ($newsletter == 1) { ?>
              <input type="radio" name="newsletter" value="1" checked="checked" />
              <?php echo $text_yes; ?>
              <input type="radio" name="newsletter" value="0" />
              <?php echo $text_no; ?>
              <?php } else { ?>
              <input type="radio" name="newsletter" value="1" />
              <?php echo $text_yes; ?>
              <input type="radio" name="newsletter" value="0" checked="checked" />
              <?php echo $text_no; ?>
              <?php } ?></td>
          </tr>
        </table>
      </div>
      <?php if ($text_agree) { ?>
      <div class="buttons">
        <table>
          <tr>
            <td align="right" style="padding-right: 5px;"><?php echo $text_agree; ?></td>
            <td width="5" style="padding-right: 10px;"><?php if ($agree) { ?>
              <input type="checkbox" name="agree" value="1" checked="checked" />
              <?php } else { ?>
              <input type="checkbox" name="agree" value="1" />
              <?php } ?></td>
            <td align="right" width="5"><a onclick="$('#create').submit();" class="button"><span><?php echo $button_continue; ?></span></a></td>
          </tr>
        </table>
      </div>
      <?php } else { ?>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><a onclick="$('#create').submit();" class="button"><span><?php echo $button_continue; ?></span></a></td>
          </tr>
        </table>
      </div>
      <?php } ?>
    </form>
  </div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
  <script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/create/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
$('#postcode').load('index.php?route=account/create/postcode&country_id=<?php echo $country_id; ?>');
//--></script>
<?php echo $footer; ?> 

Thanks James.

New member

Posts

Joined
Tue Apr 05, 2011 10:14 pm

Post by florinsith » Sat Apr 16, 2011 9:23 pm

It does not seem to me like that is all the code. Unless is continuationfor another file used to register. Please post all your files from the account folder (just their names).

All the respect!

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by james101 » Sat Apr 16, 2011 9:43 pm

florinsith wrote:It does not seem to me like that is all the code. Unless is continuationfor another file used to register. Please post all your files from the account folder (just their names).

All the respect!
All files inside account folder.

password.tpl
newsletter.tpl
login.tpl
invoice.tpl
history.tpl
forgotten.tpl
edit.tpl
download.tpl
create.tpl
addresses.tpl
address.tpl
account.tpl

James.

New member

Posts

Joined
Tue Apr 05, 2011 10:14 pm

Post by florinsith » Sat Apr 16, 2011 10:26 pm

Those are the same as in default.
Ask the theme developer how the Register works on that template.

All the respect!

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by james101 » Sat Apr 16, 2011 10:58 pm

florinsith wrote:Those are the same as in default.
Ask the theme developer how the Register works on that template.

All the respect!

Hi florinsith i did ask the theme developer...been waiting 4days for reply now.
Thats why i posted on here.

Thanks for looking James.

New member

Posts

Joined
Tue Apr 05, 2011 10:14 pm

Post by florinsith » Sat Apr 16, 2011 10:59 pm

James , contact me at flo@shop-carts.net.
All the respect!

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by james101 » Sat Apr 16, 2011 11:12 pm

florinsith wrote:James , contact me at flo@shop-carts.net.
All the respect!

Ok i have sent you email thank you James.

New member

Posts

Joined
Tue Apr 05, 2011 10:14 pm

Post by florinsith » Sun Apr 17, 2011 1:19 am

For those of you that needs to remove the adress from the register form field , I allready modified the files and put them into your archive. You may backup the 3 files before overwrite them.
It should be compatible with all 149x

All the respect!

Attachments

opencart mod


Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by rudhro_bd » Sat May 21, 2011 12:44 am

how to rename Guest Checkout form's fields?? in which files i'll need to edit??
i'm quite new in open cart, and also have very few code knowledge. currently i use oc v1.4.9.5.

with regards.

New member

Posts

Joined
Sat Apr 23, 2011 12:45 pm

Post by managermd » Wed Jun 15, 2011 4:22 pm

florinsith wrote:For those of you that needs to remove the adress from the register form field , I allready modified the files and put them into your archive. You may backup the 3 files before overwrite them.
It should be compatible with all 149x

All the respect!
Hello and thanks for this file.
It works fine
I used it before and I was not in open cart to write about it !
Thank you.

Newbie

Posts

Joined
Sun Jan 02, 2011 8:45 am

Post by florinsith » Fri Jun 17, 2011 6:09 pm

rudhro_bd wrote:how to rename Guest Checkout form's fields?? in which files i'll need to edit??
i'm quite new in open cart, and also have very few code knowledge. currently i use oc v1.4.9.5.

with regards.
In catalog/language/english/checkout/guest_step.php

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by paffley » Mon Sep 26, 2011 8:24 pm

Hi, does this work or is there a solution for Opencart 1.5.x?



Kind regards,
paffley

New member

Posts

Joined
Wed Aug 17, 2011 7:12 pm

Post by affect » Tue Sep 27, 2011 3:29 am

Just did the same thing on my 1.5.1.1 OC installation since I want to sell downloads and don't need addresses too.

For now I removed the fields from the checkout form.

First I removed error checks in catalog/controller/checkout/register.php, i.e. commented out

Code: Select all

$json['error']['lastname'] = $this->language->get('error_lastname');
$json['error']['telephone'] = $this->language->get('error_telephone');
$json['error']['address_1'] = $this->language->get('error_address_1');
$json['error']['city'] = $this->language->get('error_city');
$json['error']['postcode'] = $this->language->get('error_postcode');
$json['error']['country'] = $this->language->get('error_country');
$json['error']['zone'] = $this->language->get('error_zone');
I wanted to keep the form as simple as possible so I only kept first name and email intact.

Then I had a choice to either hide the input fields in the default/template/checkout/register.tpl template or substitute it with my own template.

Since I was using vqmod to do my modifications, it was easier for me to make the controller load a different template instead of modifying the default one, so I changed the following lines in catalog/controller/checkout/register.php from

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/register.tpl')) {

$this->template = $this->config->get('config_template') . '/template/checkout/register.tpl

$this->template = 'default/template/checkout/register.tpl';
to

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/register-lite.tpl')) {

$this->template = $this->config->get('config_template') . '/template/checkout/register-lite.tpl';

$this->template = 'default/template/checkout/register-lite.tpl';
After that I copied the template register.tpl and added a style="display: none" to the fields I don't want to appear, including the whole "Address" div. I didn't remove them since I still need them to exist so they get passed to the controller and I don't get any undefined index warnings.

Basically that's it. Since I used vqmod for my modifications, all I need to do to revert everything back to normal is delete the xml file.

If you want to remove the fields from the account registration screen too, you'll need to do the same for controller/account/register.php and the corresponding template.

MultiMerch Marketplace for OpenCart

Image


User avatar
Active Member

Posts

Joined
Sat Aug 13, 2011 5:04 pm


Post by mberlant » Tue Sep 27, 2011 10:02 am

What form of payment are you accepting that does not require the purchaser's address for fraud prevention?

Please use proper English at all times, so that all members may understand you.


User avatar
Active Member

Posts

Joined
Sun Mar 13, 2011 8:33 pm

Post by affect » Tue Sep 27, 2011 3:47 pm

I'll be using PayPal only so it's not a problem.

MultiMerch Marketplace for OpenCart

Image


User avatar
Active Member

Posts

Joined
Sat Aug 13, 2011 5:04 pm


Post by florinsith » Tue Sep 27, 2011 5:58 pm

Actualy it is. At some point paypal is going to question some transactions because of the missing adress. Happened to me.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Who is online

Users browsing this forum: No registered users and 15 guests