Jump to content


Photo

opencart checkout, select store branch and pick-up date


Best Answer Yohanne, 23 January 2017 - 12:23 PM

when i add two text field below, branchname and pickdate i got the error message.

if (!$json) {
$this->session->data['shipping_method'] = $this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]];
$this->session->data['branchnamed'] = $this->request->post['branchname'];
$this->session->data['pickup_dated'] = $this->request->post['pickup_date'];
$this->session->data['comment'] = strip_tags($this->request->post['comment']);
		}

		$this->response->addHeader('Content-Type: application/json');
		$this->response->setOutput(json_encode($json));

error..

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined index: branchname in <b>/home/octagon/public_html/ocs_shop/upload/catalog/controller/checkout/shipping_method.php
Go to the full post


  • Please log in to reply
3 replies to this topic

#1 Yohanne

Yohanne
  • Members
  • PipPipPip
  • Advanced Member
  • 213 posts
  • LocationPhilippines

Posted 04 January 2017 - 02:59 AM

Hi coders,

 

 

i have added new fields for store branch and pick-up date, but i cannot insert the data in the said fields. i try many times but i cannot get it.

 

so please help. give me an instruction where i did get wrong..

 

 

opecart v2.3

 

1121212.png



#2 Destramic

Destramic
  • Members
  • PipPipPip
  • Advanced Member
  • 910 posts
  • LocationUnited Kingdom

Posted 13 January 2017 - 09:55 PM

what errors have you got?...also if your storing in the database you want to be using DATE field type



#3 Yohanne

Yohanne
  • Members
  • PipPipPip
  • Advanced Member
  • 213 posts
  • LocationPhilippines

Posted 23 January 2017 - 12:23 PM   Best Answer

when i add two text field below, branchname and pickdate i got the error message.

if (!$json) {
$this->session->data['shipping_method'] = $this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]];
$this->session->data['branchnamed'] = $this->request->post['branchname'];
$this->session->data['pickup_dated'] = $this->request->post['pickup_date'];
$this->session->data['comment'] = strip_tags($this->request->post['comment']);
		}

		$this->response->addHeader('Content-Type: application/json');
		$this->response->setOutput(json_encode($json));

error..

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined index: branchname in <b>/home/octagon/public_html/ocs_shop/upload/catalog/controller/checkout/shipping_method.php


#4 Yenta4

Yenta4
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 09 February 2017 - 09:49 AM

thanks


Edited by Yenta4, 09 February 2017 - 09:50 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users