Post by jrr » Wed Jul 29, 2020 1:24 pm

Trying to resolve a problem I am having with a conversion process from oscMax 2.5.4 to OC 3.0.3.6 (same problem iin 3.0.3.5). LitExtension has been working with me to make a smoothly working conversion process for my obsolete shopping cart but we have run into snag and they suggested I reach out here.

What is happening is when I do a fresh install of OC and then create an order, the Admin/Order/(order itself)/Print Invoice or Print Shipping label, both work as they should - opening a fresh page and filling it either with the order invoice or the order stock pull list.

However after running the LitExtension demo which takes 20 early sales from my shopping cart and adds them and the products to my OC-3.0.3.6 database, if I then go to any existing order the Print Shipping label comes up as a blank page. Much like a PHP error, but I have all error reporting turned on and when I did an fn-F12 on the page (Firefox) there was nothing but the header info, no body to the page at all.

I tried to create a new order, but still no action on the Print Shipping label, other than a blank page.

What I am trying to figure out is how the system works here. I know that admin/index.php?route=sale/order/invoice&user_token=(stuff) is the build for the Print Invoice page and the same URL but with /shipping/ is done with Print Shipping button admin/index.php?route=sale/order/shipping&user_token=(stuff). I guess I have to tear into index.php to see what is called for Shipping vs Invoice and with that perhaps see what would break the display.

Looks like I need to learn about trees - there are a bunch of twigs here. In particular one called order_shipping.twig may be promising...

Suggestions greatly appreciated as I can barely read PHP code, and this OC system is all new to me compare to oscMax where each function had its own php file...

Thanks!
Last edited by jrr on Fri Jul 31, 2020 1:29 pm, edited 1 time in total.

jrr
New member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by letxobnav » Wed Jul 29, 2020 2:20 pm

invoice in admin/index.php?route=sale/order/invoice&user_token=(stuff) is the function invoice in the class sale/order
output is done via view call

Code: Select all

$this->response->setOutput($this->load->view('sale/order_invoice', $data));
same for shipping which is a function in the same class.
output is done via view call

Code: Select all

$this->response->setOutput($this->load->view('sale/order_shipping', $data));

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member
Online

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by sw!tch » Wed Jul 29, 2020 4:48 pm

If you are getting a blank page check your actual server error logs, they typically reside in your home folder in a logs directory or your hosting control panel will have an error log section.. Don't always rely on the opencart logs, fatal errors and such are not always recorded there

My guess is its probably an SQL error or memory issue.

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by jrr » Thu Jul 30, 2020 8:29 am

Well, it does seem to use order_shipping.twig, because when I put this bit of code:

Code: Select all

<ol>
    {% for key, value in _context  %}
      <li>{{ key }}</li>
    {% endfor %}
</ol>
(from https://webocreation.com/blog/how-to-see-all-variables/ it gives me a long list (273) of variables that are used when generating the Print Invoice...
Still poking away, trying to find what is broken, I suspect one critical variable is being cleared and this just stops the Print Shipping form completely.

jrr
New member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by letxobnav » Thu Jul 30, 2020 12:32 pm

I thought LitExtension services guaranteed a smooth turn-key migration in their ads?

Still, you could also just look at your error logs, the php ones.
If those are empty, use trace.

First see if the controller function is ok by adding
// tracing

Code: Select all

$this->log->write('calling view order_shipping...');
// show data passed to view

Code: Select all

$this->log->write(print_r($data,true));
before:

Code: Select all

$this->response->setOutput($this->load->view('sale/order_shipping', $data));

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member
Online

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by jrr » Thu Jul 30, 2020 1:45 pm

letxobnav wrote:
Thu Jul 30, 2020 12:32 pm
I thought LitExtension services guaranteed a smooth turn-key migration in their ads?
I don't fault them, this is an old oscMax installation from around 2010 and part of the problem I'm sure is my not understanding how OC is supposed to work.

Looking into this business of printing or not printing the Shipping List it appears that the problem is:

#1) If you go to Admin/Sales/Orders where it lists the Orders and has those little tick-boxes. Now if the Order is not paid for, then when you mouse over Print Shipping that shows a 'blocked' symbol and the button is greyed out. Print Invoice is OK, and is not greyed out (is that green? I'm colour deficient for Red/Green, it just looks darker).

#2)However If you go to Admin/Sales/Orders/Edit Order then you get the same two buttons (they are reversed in order now), both of which are not light grey now, and both buttons do something - the Print Invoice does indeed print the invoice, but the Print Shipping just prints a blank page - because the Order is not paid! It should still be greyed out - I guess this is a bug....

I am having trouble with the Paid modules now, whatever is going on with the migration is exacerbated by the above minor bug #2, leading to:

#3) going to a Admin/Sales/Orders/Edit Order(selecting some customer order) and start cycling through the Continues I notice that the first page is #1 Customer Details, next Continue is the #2 Products ordered, then the next displays the Shipping Address, but highlights 3. Payment Details, and then one more Continue takes you to #4 Shipping Details (displaying same address info again), and then on to #5 Totals...

I think I'm going to reinstall 3.0.3.6 fresh and try again. I have to wonder if I broke something or a cache is interfering with what I am trying to do.

jrr
New member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by letxobnav » Thu Jul 30, 2020 3:15 pm

I don't fault them, this is an old oscMax installation from around 2010 and part of the problem I'm sure is my not understanding how OC is supposed to work.
They should know.
I think I'm going to reinstall 3.0.3.6 fresh and try again.
Yep, your troubles are not big enough, better try 3.0.3.6.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member
Online

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by jrr » Fri Jul 31, 2020 12:08 am

letxobnav wrote:
Thu Jul 30, 2020 3:15 pm
I think I'm going to reinstall 3.0.3.6 fresh and try again.
Yep, your troubles are not big enough, better try 3.0.3.6.
Yes, I do tend to bring things down on myself. Still, this is the last problem that I can see with my installing 3.0.3.6 - the shipping labels issue. I could go back to earlier version, but all versions have problems - so I figure why not work with the latest that (for me) only seems to have one issue...

Thanks!

jrr
New member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by IP_CAM » Fri Jul 31, 2020 12:58 am

but all versions have problems
Well, not really, some good one's exist, like famous CONDOR2's
updated 2.3.0.2 Github Versions:
https://github.com/IP-CAM/Opencart_2302_MV
https://github.com/IP-CAM/Opencart_2302_MV-1

Among some nice russian editions, available up to v.2.3.0.2.5,
but for those, one might need to translate a few things first... :laugh:
https://opencart-cms.ru/opencart/skacha ... encart_pro
Just to have it mentioned, for those, not always looking for Numbers only ... :crazy:
Ernie

Please don't send me OC Forum Personal Messages, just contact: jti@jacob.ch
---
OC 1.5.6.5 LIGHT Test Site: http://www.bigmax.ch/shop/
OC 1.5.6.5 V-PRO Test Site: http://www.openshop.li/shop/
My Github OC Site: https://github.com/IP-CAM
2'600+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by jrr » Fri Jul 31, 2020 1:28 pm

IP_CAM wrote:
Fri Jul 31, 2020 12:58 am
but all versions have problems
Well, not really, some good one's exist, like famous CONDOR2's
updated 2.3.0.2 Github Versions:
https://github.com/IP-CAM/Opencart_2302_MV
https://github.com/IP-CAM/Opencart_2302_MV-1

Ernie
Hi Ernie,
Okay, I get the message - I downloaded and installed 2.3.0.2_MV-1 and tried it out. And it seems to figure out the Admin/Orders Print Invoice and Shipping List better than 3.0.3.6 does. If the order is not paid for then the Shipping List can't generate (greyed out) a result. This is NOT the case in 3.0.3.6, it DOES ALLOW the Shipping List button, but it prints a blank page - if the order is not paid for...let's call that a bug and move on...

I'm tempted to stay with your recommended 2.3.0.2_MV-1 as it does seem to work better. I just have to work with my friends at Lit Extensions to resolve the Paid status so we can finally move my store over to OC. Looks like that is the remaining issue...

Thanks!

jrr
New member

Posts

Joined
Mon Nov 20, 2017 1:48 pm
Who is online

Users browsing this forum: No registered users and 9 guests