Post by christos_dev » Fri Jul 05, 2019 10:55 pm

Hi I'm new to opencart and i'm wondering how to run an php file where it produce xml code without make an extension.
I tryed to create a php file on the root but when i place the connection to database i get 500 error .,
How to do tha ?

Newbie

Posts

Joined
Fri Jul 05, 2019 10:49 pm

Post by straightlight » Sat Jul 06, 2019 5:22 am

3 questions posted in 1. Forum rules.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cedcommerceteam » Sat Jul 06, 2019 1:18 pm

Hello Christos,

What are you exactly trying to do can you please explain a l'll bit, I am not exactly getting you.

You can go to "where_exactly_your_folder_stored_inside_xampp/open_your_opencart_module/upload/system/startup.php" and paste following code at top of the file to check what Internal Server Error i.e., 500 internal error you are getting (this is also k/a "enabling debug mode") :

Code: Select all

error_reporting(1);
ini_set('display_errors', 'On');
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Please try this & update me with relevant information.

Thanks & Regards :

Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm

Post by christos_dev » Sat Jul 06, 2019 6:53 pm

OK thanks for the respond .
I'm trying to creat custom xml feeds for 2 greek platforms .
The website is online so i can't do that while is working .
For test i create a phpinfo() file , this works fine but when I'm trying to add mysql connection
is not i Get 500 errro

Newbie

Posts

Joined
Fri Jul 05, 2019 10:49 pm

Post by straightlight » Sat Jul 06, 2019 9:22 pm

christos_dev wrote:
Sat Jul 06, 2019 6:53 pm
OK thanks for the respond .
I'm trying to creat custom xml feeds for 2 greek platforms .
The website is online so i can't do that while is working .
For test i create a phpinfo() file , this works fine but when I'm trying to add mysql connection
is not i Get 500 errro
Correct. Those instructions should not be added if your store is running live. However, as for the for 500 error, check your error logs. Forum rules.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cedcommerceteam » Thu Jul 11, 2019 6:05 pm

Hello Christos,

Please add following code at the top of your statrup.php file :

Code: Select all

// Error Reporting
error_reporting(1);
ini_set('display_errors', 'On');
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
This will show you why you are getting 500 error.

Thanks & Regards :

Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm

Post by uksitebuilder » Fri Jul 12, 2019 2:30 pm

As you have posted this in OC 1.5.x forum, I ma guessing you are running/working on OC 1.5.x

To see how to output XML file, take a look at catalog/controller/feed/google_base.php

This file outputs to the browser without the need of a template file. Of course can be changed to write to a file on the server instead.

You can then load any of OC's model files to get the information you need and/or create a new model file if you need to access the database to get data ina a specific way that is not already available in OpenCart's models.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom
Who is online

Users browsing this forum: No registered users and 47 guests