Jump to content

[Resolved] Default product option


rSanjoSEO

Recommended Posts

The "default" checkbox was added in CC616 (see Github).

The quickest way to check is to look at the file /admin/skins/default/templates/products.index.php, near line 368:

                  <td>{$LANG.common.status}</td>
                  <td>{$LANG.catalogue.title_product_options_matrix}</td>
                  <td>{$LANG.common.name}</td>
                  <td>{$LANG.catalogue.title_option_set}</td>
                  <td>{$LANG.common.default}</td>
                  <td>{$LANG.common.negative}</td>
                  <td>{$LANG.common.price}</td>
                  <td>{$LANG.catalogue.absolute_price}</td>
                  <td>{$LANG.common.weight}</td>
                  <td width="20">&nbsp;</td>

The fifth line is new.

If that line is not present, then one or more files, and possibly a database schema change, did not make it through the upgrade process.

 

Edited by bsmither
Link to comment
Share on other sites

35 minutes ago, bsmither said:

The "default" checkbox was added in CC616 (see Github).

The quickest way to check is to look at the file /admin/skins/default/templates/products.index.php, near line 368:


                  <td>{$LANG.common.status}</td>
                  <td>{$LANG.catalogue.title_product_options_matrix}</td>
                  <td>{$LANG.common.name}</td>
                  <td>{$LANG.catalogue.title_option_set}</td>
                  <td>{$LANG.common.default}</td>
                  <td>{$LANG.common.negative}</td>
                  <td>{$LANG.common.price}</td>
                  <td>{$LANG.catalogue.absolute_price}</td>
                  <td>{$LANG.common.weight}</td>
                  <td width="20">&nbsp;</td>

The fifth line is new.

If that line is not present, then one or more files, and possibly a database schema change, did not make it through the upgrade process.

 

So, when doing the upgrade it created an admin_$#^$$^%$^$ folder. The regular /admin/ folder has the change, but the /admin_3454565/ folder does not have the change. This has always been a problem when upgrading. Even when upgrading manually and running the upgrade setup. Now I am concerned that other things may not have transferred over???

 

EDIT: Correction, I am on 6.1.10 (the latest version)

Edited by djcaseanova
Link to comment
Share on other sites

There is no "transferring over" CubeCart PHP code. An upgrade is "whole cloth".

So, you now have a folder named /admin/ and a folder named /admin_hash/.

I suggest you determine which folder has this latest update, rename the other one to something completely bogus, then rename the correct folder to the same name that is in the /includes/global.inc.php file.

(Yes, I do understand that having implemented a derived name for the admin folder introduced a number of headaches.)

Just to make sure, also force your browser to reload the admin page resources (javascript and css - new versions in CC6110 - and images.) This is usually done with CTRL-F5.

  • Thanks 1
Link to comment
Share on other sites

There were problems doing automatic upgrades that have been well documented.  The only safe way was to upgrade manually and if you still have the /admin directory then it means you didnt do the manual upgrade correctly !  if you already had the admin_xxxxxx directory then when uploading the files as part of the upgrade you should have copied the contents of /admin in the zip file into your admin_xxxxxx directory - I am guessing you simply uploaded /admin !   So you have been running a 6.1.10 store but with an old admin set of files in /admin_xxxxxx

The best way forward would be to simply re-upload all files again taking care to upload admin.php to whatever your new admin_yyyyyy.php file is called and the contents of /admin to /admin_xxxxxx directory.  You can re-upload the setup directory and re-run that if you wish if there is any doubt that all database changes havent been completed previously

Ian

Link to comment
Share on other sites

On 9/27/2017 at 8:22 AM, havenswift-hosting said:

There were problems doing automatic upgrades that have been well documented.  The only safe way was to upgrade manually and if you still have the /admin directory then it means you didnt do the manual upgrade correctly !  if you already had the admin_xxxxxx directory then when uploading the files as part of the upgrade you should have copied the contents of /admin in the zip file into your admin_xxxxxx directory - I am guessing you simply uploaded /admin !   So you have been running a 6.1.10 store but with an old admin set of files in /admin_xxxxxx

The best way forward would be to simply re-upload all files again taking care to upload admin.php to whatever your new admin_yyyyyy.php file is called and the contents of /admin to /admin_xxxxxx directory.  You can re-upload the setup directory and re-run that if you wish if there is any doubt that all database changes havent been completed previously

Ian

This makes sense. However, regardless of that each time it's upgraded, a new admin.php and /admin_###/ folder are created leaving behind the old/original file and folders. During this fix, I went ahead and reinstalled cubecart, and it left my old /admin_####/ folder and created a new one.

Link to comment
Share on other sites

12 minutes ago, djcaseanova said:

This makes sense. However, regardless of that each time it's upgraded, a new admin.php and /admin_###/ folder are created leaving behind the old/original file and folders. During this fix, I went ahead and reinstalled cubecart, and it left my old /admin_####/ folder and created a new one.

That isnt possible at all if you are following the above instructions !  If you rename the admin.php from the zip file before you upload it so that it matches your current admin_xxxxxx.php and ONLY copy all files and directories from /admin directory into your /admin_yyyyyy directory - then you can delete admin.php and /admin directory from your website files, you cannot possibly be left with those - from what you are describing, you will still have mixed version files on your system

If you are unsure, then I can sort it for you

Ian

Link to comment
Share on other sites

I assure you it's possible. I still have the admin_cygi4v folder in my trash bin along with the old admin_###.php file. I even had Cross forgery errors when I was attempting to get rid of the old ### files.

I looked inside the global file to make sure I had the correct directories and php files, which I did. I ended up doing a reinstall and was able to get things fixed and working properly, but ultimately had to reconfigure my entire store settings, etc. The cross forgery settings may have been due to https or something of that nature. Upon doing the new install, it left the old admin folders/files in place which I have deleted and everything is working fine now.

Link to comment
Share on other sites

31 minutes ago, djcaseanova said:

I assure you it's possible. I still have the admin_cygi4v folder in my trash bin along with the old admin_###.php file. I even had Cross forgery errors when I was attempting to get rid of the old ### files.

I must have done well in excess of 400 upgrades since the new renamed admin file and directory structures were brought in and I am sure that @Al Brookbanks has also done at least as many - what you are describing has never happened to me and I am pretty sure that Al would say the same - it can ONLY happen if an upgrade isnt completed correctly whether due to the old bugs in the built in upgrade procedure or by doing the manual upgrade incorrectly.

For example you previously said "During this fix, I went ahead and reinstalled cubecart, and it left my old /admin_####/ folder and created a new one."

So you already had an /admin_xxxxxx directory and what you did was upload /admin - that is wrong and is what causes your issues.  What you should do is upload the contents of /admin to /admin_xxxxxx and then run the upgrade

CSRF errors will occur if your admin_yyyyyy.php file and the admin_xxxxxx directory are from different versions

Link to comment
Share on other sites

Let me try and explain the reinstall to you once more. I am not trying to argue with you, just explaining my steps.

The UPGRADE process that went wrong, you are correct, I must have uploaded the /admin/ folder and everything as is without changing and that left the /admin/ folder and a /admin_####/ folder along with two files admin.php and admin_###.php. Once I uploaded  the proper files per bsmithers recommendation (after finding the newer of the two admin folders) it worked just fine.... Until I went to log out and sign back in I started getting the CSRF errors and couldn't log back in.

I reuploaded a fresh copy (this time copying properly) and was not allowed to do an UPGRADE during the setup process because it said the software was already upgraded and the latest version. So I did the fresh install option, it ran through it's processes, I filled in all the database information, username, password, localhost, etc. Signed in to admin and everything worked fine. Loaded up my FTP and had my old /admin_#####/ and admin_####.php file in addition to the NEW /admin_####/ folder and new admin_####.php

I checked the global file and kept the folder that was indicated in there and kept the proper admin php file and deleted the others. In the image, left side is current working, right side is the folder I removed because it was left behind during the fresh install. Nothing else was removed.

 

Again, I am not trying to argue. I am trying to make absolute sure everything was installed properly before moving further with the store creation. You're saying this isn't possible, but it happened, and that's making me uneasy about the install. If this did in fact not take properly, will I be able to back up the database and files and delete EVERYTHING and start from ground up, recall the database files and files and be were I left off?

 

Screen Shot 2017-09-28 at 12.45.32 PM.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...