Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7953127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:04:12+00:00 2026-06-04T03:04:12+00:00

I am setting a custom session in the catalog/controller/checkout/cart.php controller. All it does, it

  • 0

I am setting a custom session in the catalog/controller/checkout/cart.php controller. All it does, it checks if a value is set or not.

if (isset($this->request->post['no_tax']) && $this->request->post['no_tax'] == '1') 
{
   $this->session->data['no_tax'] = true;
} 
elseif (isset($this->request->post['no_tax']) && $this->request->post['no_tax'] === '0') 
{
   unset($this->session->data['no_tax']);
}

I can then access this in the catalog/model/shipping/totalbased.php model file,

isset($this->session->data['no_tax'])

The problem is, I need to send additioanl information in the order to the admin, which is done in the catalog/model/checkout/order.php

I’ve done a check in there:

if(isset($this->session->data['no_tax']) )
{
   //do something
}
$mail->send();

The do something, simply adds a PDF. The problem is, the PDF isn’t attached.

In the error.txt, I get: 2012-05-14 14:42:11 - PHP Notice: Undefined index: no_tax in /var/www/vhosts/site.com/httpdocs/catalog/order.php

Can I access the session this way?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:04:13+00:00Added an answer on June 4, 2026 at 3:04 am

    The code looks fine from what I can see, and yes you can access the data like you’ve shown. The error you’ve had looks like you have tried to access the session data directly at some point without checking it’s set, causing the notice

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Jetty 7.0.2, I am unable to set a custom session cookie path. I
Trying to add a custom pin for current location, However the location does not
It appears as though NSNumberFormatter's method for setting custom formatters . setFormat: isn't available
I'm setting a custom StatusDescription in a RESTful WCF service when an exception is
I'm setting a custom banner and dialog image for my WiX generated MSI. <WixVariable
I'm having trouble setting a custom back button. Below is the current code I'm
I would like to read custom setting which i have done in ServiceConfiguration.cscfg &
I have a application for android 2.3.3 where I am setting some custom titles
I'm setting up a custom blog that grabs the posts from a mysql database.
I'm creating a JSpinner and setting a NumberEditor with a custom format. But no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.