Zen Cart Logo
Forums / Upgrading to 1.5.x / Docs index, includes/classes/shopping_cart.php, and CHANGES-714

Docs index, includes/classes/shopping_cart.php, and CHANGES-714

Views: 4,657

Results 1 to 6 of 6
10 Jan 2015, 12:13 AM
#1
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Docs index, includes/classes/shopping_cart.php, and CHANGES-714

Upgrading from 1.5.3 to 1.5.4 I noticed a few things.

The index.html in the Docs folder needs to be updated.

I found this in includes/classes/shopping_cart.php

//@@TODO - should be okay to remove
        if (false && $new_qty == (int)$new_qty) {
          $new_qty = (int)$new_qty;
        }

I also had problems using zc_install, I could not get past the database upgrade where you have to put in your password. I ended up creating a patch file directly from the file in the sql directory. I think I'll do this from now on with upgrades. Having to rename my admin back and forth on my production site is a pain.

Finally, I had some questions with regard to CHANGE-714 - Add progressive-enhancement to checkout flow for PCI compliance when card details collected onsite (added ajax infrastructure, and jQuery)

I have a custom template that does away with the css/js loading in html_header.php. Should I include the new jscript_framework.php? If so header or footer? What exactly is going on/needed with this code?

10 Jan 2015, 12:50 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Docs index, includes/classes/shopping_cart.php, and CHANGES-714

llynix:

I found this in includes/classes/shopping_cart.php

//@@TODO - should be okay to remove
if (false && $new_qty == (int)$new_qty) {
$new_qty = (int)$new_qty;
}


> **llynix:**
>
> I also had problems using zc_install, I could not get past the database upgrade where you have to put in your password.It would be helpful if you had posted about that issue so that we could determine a proper code fix so that if there's a real bug then it can be fixed for others.

> **llynix:**
>
> I ended up creating a patch file directly from the file in the sql directory. I think I'll do this from now on with upgrades.That is something we STRONGLY advise against. There are sometimes other changes made to database data via zc_install which go beyond the simple SQL statements that exist in the .sql files. If PHP code must be used to intelligently update certain data to new formats or distributed across additional fields then if you only did the sql statements you'd be missing out on critical updates. 
ALWAYS use zc_install to do your database upgrades.
 
> **llynix:**
>
> Having to rename my admin back and forth on my production site is a pain.But ... you DON'T have to rename your admin to do a database upgrade. In zc_install, if you're doing an upgrade, you can simply ignore the note that the admin configure.php file isn't found, and proceed with clicking the Database Upgrade button. 
 
> **llynix:**
>
> Finally, I had some questions with regard to CHANGE-714 - Add progressive-enhancement to checkout flow for PCI compliance when card details collected onsite (added ajax infrastructure, and jQuery)
> 
> I have a custom template that does away with the css/js loading in html_header.php.  Should I include the new jscript_framework.php?  If so header or footer?  What exactly is going on/needed with this code?
That code is triggering necessary ajax code which is used during login and checkout to ensure the checkout is as secure as possible... namely to ensure that any payment details are transmitted securely. 
So, yes, you should include the functionality on your site. If it was completely optional it would have been made into a plugin instead of being included in core code.

> **llynix:**
>
> The index.html in the Docs folder needs to be updated.Thanks. Not sure how all the beta testers missed that, but evidently they did.
10 Jan 2015, 3:00 AM
#3
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Docs index, includes/classes/shopping_cart.php, and CHANGES-714

whoops....:blush: note to self actually read the docs

11 Jan 2015, 12:02 PM
#4
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,873
Plugin Contributions:
7

Re: Docs index, includes/classes/shopping_cart.php, and CHANGES-714

But ... you DON'T have to rename your admin to do a database upgrade. In zc_install, if you're doing an upgrade, you can simply ignore the note that the admin configure.php file isn't found, and proceed with clicking the Database Upgrade button.
Really!?? I took the message at face value and also rename the admin temporarily.
I don't see that mentioned anywhere...the installer should find configure.php anyway don't you think?

Docs

... Not sure how all the beta testers missed that, but evidently they did.
Personally I only look at whats new/changed files, "Familiarity breeds contempt" I suppose...

12 Jan 2015, 7:12 PM
#5
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Re: Docs index, includes/classes/shopping_cart.php, and CHANGES-714

DrByte:

Is there some particular problem you're encountering with that? Or is this just a "good samaritan reminder that there's a @TODO note in the code"?

Just dropping a note.

It would be helpful if you had posted about that issue so that we could determine a proper code fix so that if there's a real bug then it can be fixed for others.

That is something we STRONGLY advise against. There are sometimes other changes made to database data via zc_install which go beyond the simple SQL statements that exist in the .sql files. If PHP code must be used to intelligently update certain data to new formats or distributed across additional fields then if you only did the sql statements you'd be missing out on critical updates.
ALWAYS use zc_install to do your database upgrades.

But ... you DON'T have to rename your admin to do a database upgrade. In zc_install, if you're doing an upgrade, you can simply ignore the note that the admin configure.php file isn't found, and proceed with clicking the Database Upgrade button.

I will start a new thread with the problems I'm having with the install.

That code is triggering necessary ajax code which is used during login and checkout to ensure the checkout is as secure as possible... namely to ensure that any payment details are transmitted securely.
So, yes, you should include the functionality on your site. If it was completely optional it would have been made into a plugin instead of being included in core code.

Thanks. Not sure how all the beta testers missed that, but evidently they did.[/COLOR]

I have incorporated CHANGE-714 into my template. Thank you for the clarification.

12 Jan 2015, 7:32 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Docs index, includes/classes/shopping_cart.php, and CHANGES-714

torvista:

Really!?? I took the message at face value and also rename the admin temporarily.
I don't see that mentioned anywhere...the installer should find configure.php anyway don't you think?

I used to do the same thing until I was corrected, specifically when I was providing assistance to someone else about performing a database only upgrade. Afterall, once the admin directory is renamed to admin, a message displays on the store front about it, whereas the database only upgrade will automatically place the store in maintenance mode without ever making the notification about the admin directory issue. If anything the instructions about performing the database only upgrade are silent on renaming the admin directory because it is not necessary. Sure it could state things like you don't need to rename the admin directory, but how many other things need to be identified that you don't need to do?

Like you said, the important part is finding includes/configure.php...

Don't know about breeding contempt but certainly accepting non-standard practice.. :)