Post by digidude » Fri Dec 07, 2012 8:00 pm

I have done a lot of searching, and come across a few extensions, but none actually state if they do what i want, also, i have come across a few unanswered posts asking for the same sort of thing.

My shop has a 'clearance section' selling end of line and ex-demonstration equipment. For products in this catrgory, during either the add to basket, or checkout process, i would like for there to be an extra 'check box' that users have to agree to, like they do with the terms and conditions, before they can complete their order

so, if they buy from the shop normal new equipment, they only have to agree to the terms and conditions, as normal, but, if they have anything from the clearence section, they have an additional set of terms they must also agree to

is this possible using either an extension, or by editing and adding files, id rather NOT use vqmod as for some reason that stops my slideshows from loading, so the extensions i do have, i have sorted out everything manually

thank you for reading

(opencart version 1.5.4.1)

Newbie

Posts

Joined
Wed Nov 28, 2012 2:01 am

Post by kv-3 » Fri Dec 07, 2012 10:24 pm

Hi,

This is quite a custom modification you need, so I'm almost sure there won't be any modules for that.

You can do that manually, but you'll have to edit the core files and without vqmod that will make all future updates very painful.

Well, anyway, you have to edit catalog\controller\checkout\payement_method.php and also corresponding language file.
Look for this piece of code and implement your logics there:

Code: Select all

		if ($this->config->get('config_checkout_id')) {
			$this->load->model('catalog/information');
			
			$information_info = $this->model_catalog_information->getInformation($this->config->get('config_checkout_id'));
			
			if ($information_info) {
				$this->data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->link('information/information/info', 'information_id=' . $this->config->get('config_checkout_id'), 'SSL'), $information_info['title'], $information_info['title']);
			} else {
				$this->data['text_agree'] = '';
			}
		} else {
			$this->data['text_agree'] = '';
		}

Module Hub http://www.modulehub.com — the digital marketplace for modules and extensions
ffct.cc http://ffct.cc/ — opencart modules and extensions, development and installation


Newbie

Posts

Joined
Sun Nov 25, 2012 9:25 pm

Post by blocks1 » Tue Apr 02, 2019 9:29 pm

if i wanted to draw in some text from the language file, how could i do that?

$_['text_agree_order'] = 'By placing your order you agree to our Terms & Conditions, privacy and returns policies. You also consent to some of your data being stored by mywebsite, which may be used to make future shopping experiences better for you.';

i have looked through the code there, but cant figure out how to draw in a regular string of text..

New member

Posts

Joined
Thu Feb 08, 2018 11:14 am
Who is online

Users browsing this forum: No registered users and 285 guests