Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Адрес информационных ситей как в сирых версиях


 Share

Recommended Posts

Привет, в сирых версиях oc, был адрес ситей index.php?route=information/information/info&information_id=1 из которого можно было сгделать например popup, в новой 3 этот адрес не рилииет, его совсем убрали или изменился?

Link to comment
Share on other sites


1 минуту назад, Seriusis сказал:

index.php?route=information/information&information_id=1

 

нет это не то, открывается страница полностью а раньше было только контент ситьи

Link to comment
Share on other sites


2 минуты назад, alexb сказал:

 

нет это не то, открывается страница полностью а раньше было только контент ситьи

 Вы можете просто скопировать ее из сирой версии, может что-то нужно бугдет подправить, пробуйте

public function info() {
   $this->load->model('catalog/information');
   
   if (isset($this->request->get['information_id'])) {
      $information_id = (int)$this->request->get['information_id'];
   } else {
      $information_id = 0;
   }      
   
   $information_info = $this->model_catalog_information->getInformation($information_id);

   if ($information_info) {
      $output  = '<html dir="ltr" lang="en">' . "\n";
      $output .= '<head>' . "\n";
      $output .= '  <title>' . $information_info['title'] . '</title>' . "\n";
      $output .= '  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' . "\n";
      $output .= '  <meta name="robots" content="noindex">' . "\n";
      $output .= '</head>' . "\n";
      $output .= '<body>' . "\n";
      $output .= '  <h1>' . $information_info['title'] . '</h1>' . "\n";
      $output .= html_entity_decode($information_info['description'], ENT_QUOTES, 'UTF-8') . "\n";
      $output .= '  </body>' . "\n";
      $output .= '</html>' . "\n";         

      $this->response->setOutput($output);
   }
}
  • +1 1
Link to comment
Share on other sites

добавить это в catalog/controller/information/information.php перед 

public function agree() {

  • +1 1
Link to comment
Share on other sites

1 час назад, Seriusis сказал:

добавить это в catalog/controller/information/information.php перед 

public function agree() {

 

Спасипотому что все рилииет

Link to comment
Share on other sites


  • 4 weeks later...

Не надо ничего добавлять, метод info переименован в agree.

Было: index.php?route=information/information/info&information_id=1

 

Сило: index.php?route=information/information/agree&information_id=1

  • +1 1
Link to comment
Share on other sites

А можно этим же методом сгделать для товаров?

 сгделал по аналогии но не рилииет

  
	public function agree() {
		$this->load->model('catalog/product');

		if (isset($this->request->get['product_id'])) {
			$product_id = (int)$this->request->get['product_id'];
		} else {
			$product_id = 0;
		}

		$output = '';

		$product_info = $this->model_catalog_product->getProduct($product_id);

		if ($product_info) {
			$output .= html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8') . "\n";
		}

		$this->response->setOutput($output);
	}
Edited by alexb
Link to comment
Share on other sites


  • 1 year later...
В 04.07.2020 в 13:45, shoputils сказал:

Сило: index.php?route=information/information/agree&information_id=1

Подскажите пожалуйси а как для этот странички прописать чпу?

Link to comment
Share on other sites


4 минуты назад, alexb сказал:

эи страница для всплываюещёго окна, она же открывается как обычная информационная с нормальный url адресом.

Спасипотому что это нам известно, не известно только как запрос правильно сосивить в сео менеджер для этого добра.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.