Page 1 of 1

[vQmod] Remove newsletter sign up

Posted: Sat Jan 21, 2012 2:20 pm
by philbydevil
I currently manage my newsletter external to my OC store, so wanted to remove the newsletter sign-up, as well as any other links associated with the newsletter. This vQmod does that.


Newsletter links removed:
  • Newsletter sign up (when customer is registering an account)
  • Newsletter sign up (when customer is registering an account during checkout)
  • My Account
  • Account Module
  • Footer
Instructions:
  • Open the xml file and change YOURTHEME to the name of the theme you are using (ie. default, etc)
  • Upload to you xml folder
Tested on v1.5.1.3 only

Re: [vQmod] Remove newsletter sign up

Posted: Fri Jan 27, 2012 4:28 am
by cyrupmail
Thx for sharing devil, its help me a lot

but if you don't mind i have a "curiosity" question ;)

why we need to replace? :

Code: Select all

- <operation>
- <search position="replace">
- <![CDATA[ 
            $this->db->query("INSERT INTO " . DB_PREFIX . "customer SET store_id = '" . (int)$this->config->get('config_store_id') . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', password = '" . $this->db->escape(md5($data['password'])) . "', newsletter = '" . (isset($data['newsletter']) ? (int)$data['newsletter'] : 0) . "', customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "', status = '1', date_added = NOW()");
            

  ]]> 
  </search>
- <add>
- <![CDATA[ 
            $this->db->query("INSERT INTO " . DB_PREFIX . "customer SET store_id = '" . (int)$this->config->get('config_store_id') . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', password = '" . $this->db->escape(md5($data['password'])) . "', customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "', status = '1', date_added = NOW()");
            

  ]]> 
  </add>
  </operation>

and

Code: Select all

- <operation>
- <search position="replace">
- <![CDATA[ 
            <?php if ($shipping_required) { ?>
            

  ]]> 
  </search>
- <add>
- <![CDATA[ 
            --> <?php if ($shipping_required) { ?>
            

  ]]> 
  </add>
  </operation>
again, thx for sharing


Cheers

Re: [vQmod] Remove newsletter sign up

Posted: Fri Jan 27, 2012 8:01 am
by philbydevil
The first code you asked about is making it so the newsletter isn't required when the customer creates an account. If you don't use this code, you will get errors when a customer is creating an account.

The second part of the code is finishing off a commented out section. That's what the "-->" is. If you look at the search before this one, it's got the starting "<!--"

Re: [vQmod] Remove newsletter sign up

Posted: Fri Jan 27, 2012 8:09 pm
by cyrupmail
Cheers mate for sharing :)

Re: [vQmod] Remove newsletter sign up

Posted: Sun Dec 09, 2012 7:33 pm
by duffloop
Hi

I get this message

Error: Could not load model setting/setting!

when trying to subscribe?

oop wrong place (pls ignore)