Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Views: 12,070

Results 1 to 20 of 41
13 Jan 2021, 16:26
#1
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Good day friendlys,

In an attempt to provide enhanced GV functionality to our developing site, I was intrigued by what the gift_certificate_addon offered and attempted to add the plugin. All went well until the install.sql update attempt(s), twice failed with a message similar to "could not be ran from this location, when the location is within the sites structure, meaning to say it is on the server in an accessible location.

I see there has been 107 downloads, and last updated several years ago, but so far I haven't been able to find any forum information regarding the plugin, but it's a huge forum and I could have easily missed it. Pre-apologies should I be repeating a previous post addressing the issue.

I am inclined to question if the db update is required with 1.57b, and if so has anybody else tried to install it and had the same encounter, which found resolution.

As seen in the site information below, it installed the files just fine, but I'm not sure where to turn with the db error or what/where I should look to find if the database is configured with it.

Any advice from the superior minds in this forum would be tremendously appreciated.

################################################################################ Begin Site Information ########################################___
No live site yet,
ZC version 1.57b
Basic responsive classic template
Server OS: Linux 4.19.150-76.ELK.el6.x86_64
HTTP Server: Apache
PHP Version: 7.3.25 (Zend: 3.3.25)
Database Engine: MySQL 5.6.41-84.1
Plugins:
one_page_checkout-2.3.6
zen_coinpayments
Layaway- Payments accepted Alertpay & PayPal No Cr
zx_point_of_sale_1.3
fedex_web_services.5
ups_v2020_07_01
usps-USPS_2020_09_24_K11
mod_list 1.4
##################################################_Begin mod_list plugin results ########################################
Mods To This Cart
New Admin Pages
Page Name Menu Key Display Link
Category catalog N Category
Plugin Manager modules Y Plugin Manager
ZX Point of Sale configuration Y ZX Point of Sale
One-Page Checkout Settings configuration Y One-Page Checkout Settings
Gift Certificate Dashboard gv Y Gift Certificate Dashboard
Mod List tools Y Mod List
New Database Tables

zen3i_addon_gv_orders
zen3i_addon_gv_redemptions
zen3i_coinpayments
zen3i_coinpayments_session
zen3i_pos_orders
zen3i_square_payments
zen3i_zen3i_upgrade_exceptions

New Modules

Payment: cointopay.php posinstorepayment.php coinpayments.php layaway.php
Shipping: posinstore.php ups.php fedexwebservices.php usps.php
Order Total: No additional modules

Missing Admin Configuration Pages
This is caused by migrating pre 1.5.0 mods which have entries in Admin->Configuration, without creating admin_pages entries for them.

No missing admin pages found.
######################################################################End mod_list plugin results##################################################
######################################################################End Site Information############################################################

13 Jan 2021, 16:31
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,768
Plugin Contributions:
20

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

TheGrimReaper:

In an attempt to provide enhanced GV functionality to our developing site, I was intrigued by what the gift_certificate_addon offered

Uhm... Could you provide a link to this addon? Where did you find it?

13 Jan 2021, 16:36
#3
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

balihr:

Uhm... Could you provide a link to this addon? Where did you find it?

https://www.zen-cart.com/downloads.php?do=file&id=2174

I see it's last update by the author was 2017, ZC ver. 1.5.5

13 Jan 2021, 16:52
#4
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,768
Plugin Contributions:
20

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

OK, so... You've done the file modifications and uploaded all the relevant files and you just need to run the SQL query and it fails? How are you running the query, are you using admin->Tools->Install SQL Patches? If so, do you copy/paste the contents of the provided install.sql file or do you try to upload it?
Reason I'm asking is because I just installed it on my test site and it works just fine.

13 Jan 2021, 16:57
#5
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

balihr:

OK, so... You've done the file modifications and uploaded all the relevant files and you just need to run the SQL query and it fails? How are you running the query, are you using admin->Tools->Install SQL Patches? If so, do you copy/paste the contents of the provided install.sql file or do you try to upload it?
Reason I'm asking is because I just installed it on my test site and it works just fine.

Awesome. Well, I DID admin->Tools->Install SQL Patches both attempts.
I originally tried the upload from a local drive here (that worked for others)and when that failed I copied it up to the server in the zc_plugins folder and tried the 2nd time. That too failed and I removed it from the folder in the interest of keeping the folder as native as it was whilst doing this research..

13 Jan 2021, 17:01
#6
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

What I find a bit interesting is according to the mod_list results it looks like there ARE some tables from the plugin, I don't know if they're all there, not knowing which should be, or how to discover their integrity.

13 Jan 2021, 17:01
#7
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,768
Plugin Contributions:
20

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Honestly (and don't tell anyone I said that), I have no idea why that "upload sql" is even there - it's been nothing but problematic for me since day one. As if it were such a problem to open a file and copy/paste the contents and run it... Anyway, my suggestion is to always just copy/paste the sql patches and run it, don't upload the files.

13 Jan 2021, 17:10
#8
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

(chuckle)! I won't tell a soul :cool:

I'm not familiar with the copy and paste technique, though I'm sure it's simple and in trying not to overthink again I'll see if I can figure it out. Gee, it seemed like such an easy way to update the db and it worked well on a previous plugin. Oh well, it IS what it IS.

I came from years of playing with Cartweaver (v2-v4) and CW takes a LOT of thinking, thereby training my brain to think 'til it aches.

13 Jan 2021, 17:23
#9
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

I'm looking at 2 db plugins right now,
https://www.zen-cart.com/downloads.php?do=file&id=2069 - Easy Populate
and
https://www.zen-cart.com/downloads.php?do=file&id=2091 - dbio

They seem to address the inconvenient - one at a time product and db import/export.....I wonder if they might have some value in this endeavor??

13 Jan 2021, 17:31
#10
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,768
Plugin Contributions:
20

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

TheGrimReaper:

I'm looking at 2 db plugins right now,
https://www.zen-cart.com/downloads.php?do=file&id=2069 - Easy Populate
and
https://www.zen-cart.com/downloads.php?do=file&id=2091 - dbio

They seem to address the inconvenient - one at a time product and db import/export.....I wonder if they might have some value in this endeavor??

Completely off-topic because it has absolutely nothing to do with the original issue... Just to clarify this part: I'm not familiar with the copy and paste technique, - it simply means that IF the plugin comes with an install.sql file (or some similar sql thingy like sql-install.txt), you simply open that file in any text editor, even Notepad is OK, copy the contents and then paste it in the big textarea in your admin->Tools->Install SQL Patches and click Send.

As for EasyPopulate and dbIO - those are plugins that allow you to import and/or export data from your database. For example, adding thousands of products to your catalog by importing a CSV file (spreadsheet) with relevant data. But, both plugins have their own official threads so we shouldn't really be discussing it here.

13 Jan 2021, 17:38
#11
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

balihr:

Completely off-topic because it has absolutely nothing to do with the original issue... Just to clarify this part: I'm not familiar with the copy and paste technique, - it simply means that IF the plugin comes with an install.sql file (or some similar sql thingy like sql-install.txt), you simply open that file in any text editor, even Notepad is OK, copy the contents and then paste it in the big textarea in your admin->Tools->Install SQL Patches and click Send.

As for EasyPopulate and dbIO - those are plugins that allow you to import and/or export data from your database. For example, adding thousands of products to your catalog by importing a CSV file (spreadsheet) with relevant data. But, both plugins have their own official threads so we shouldn't really be discussing it here.

My apologies. I knew there was some risk in the question, I didn't meant to step on any toes.

13 Jan 2021, 17:52
#12
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,768
Plugin Contributions:
20

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

LOL, no, you didn't step on anyone's toes, I just said it so you don't expect much "support" or discussion in this thread. Both plugins are great and I love using both, but if you want to discuss any of it's features or capabilities, you'll get the best replies in their respective support threads - both lat9 and mc# provide fantastic support for their plugins. :smile:

13 Jan 2021, 19:21
#13
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Renewed greetings,
Regarding this issue, and not knowing if the database is correct, I sent myself a test gift cert for $100 USD and everything seemed to go ok, but not knowing what to really expect these are the events:

I received the email with the redemption code. Prior to redemption, I methodically viewed all fields under the "Discounts" (the forums Image upload doesn't seem to work, but I have a pic of the Discount panel, - another problem to be addressed probably somewhere else) and within this panel the only place it shows up is in "Gift Certificates Sent", not in the Dashboard and not in Queue or anywhere.

I then redeemed it for $75, expecting it to apply the $75 toward my test purchase and leave $25 in the bank- instead I receive an "Invalid Gift Certificate Redemption Code", available balance did not change and none of the fields in the menu changed. I then tried to redeem it for full value and received "Coupon code "f76f621b04" is not a valid code" but I do have a $100 balance that I can't apply. Now I'm in danger of invoking my "over thinking" curse. I tried it as a coupon code with the same result.

In short, I have a code, a balance and a pending purchase I can't apply the balance to and nothing in the menu reflects the certificate except in "Sent".

Still wondering if I have a partial or corrupt db function somewhere.... Any thoughs anyone?

Thank you.

13 Jan 2021, 20:55
#14
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Ok, I copied the code from install.sql, pasted into the "Query to be executed"block, hit "send" and get this message:

WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

13 Jan 2021, 21:13
#15
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,768
Plugin Contributions:
20

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

TheGrimReaper:

Ok, I copied the code from install.sql, pasted into the "Query to be executed"block, hit "send" and get this message:

WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

From the same plugin? Did you uninstall it before running the query again? If not, the result is pretty much expected - you already have those tables in the database. If you want to run the same query again, you basically need to undo what it did originally. In this case, this would be the uninstall.sql

DROP TABLE addon_gv_orders;
DROP TABLE addon_gv_redemptions;
DELETE FROM admin_pages WHERE page_key = 'addonGvDashboard';

But, I believe you don't need to run the sql query again - if anything had failed during the first install, the plugin wouldn't work at all and you'd probably be getting blank pages when trying to use gift certs... I can't tell for sure, I'm not familiar with that plugin...

13 Jan 2021, 21:27
#16
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Yeah, I agree. I did the uninstall and it reinstalled ok. At least now my brain can rest a bit knowing it went without a hiccup.

Thank you very much balihr, you've been extremely valuable, patient and helpful, I appreciate you and your help immensely. I can move forward in peace.
Cheers, stay healthy

13 Jan 2021, 22:53
#17
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Well, I guess I'm still here for a little while.

At least it seems it works for the most part.......but there still seems to be a bug or two and a few questions that, if anybody has any thoughts on, I'd appreciate the input.

I'm seriously trying NOT to be confusing, sometimes it just happens, and this seems like quite a load. Forgive me.

**1. **I can create a certificate thru admin/discounts/send a gift certificate, which works well from being the admin, but I can't figure out the purpose of the admin/discounts/Gift Certificate queue and admin/discounts/Gift Certificate dashboard as nothing ever seems to populate within them. The GC's do show up under admin/discounts/Gift Certificates Sent.
**
2. **I need to figure out how to make it so a customer can purchase a gift certificate, and actually pay for it. Given the blurb displayed within Gift Certificate FAQ (Copied below)I'm thinking I might need to add them as a separate category and/or product which I can link to from the main page, but then it would seem I have to enter them as specific amounts with each as it's own product, thereby preventing a buyer from entering their own amount. I'd like them to buy one of whatever denomination they want. I performed a simple quick test of acting as a buyer to send them from the storefront and didn't have to pay for it to send it, but I already had a balance in that account.

So,

I created a brand new test account to try and find a way to purchase them from within the "My Account" page as also stated in the FAQ (Below) and it's seems you have to have one in order to send one.......???? and you have to buy one to have one. The perceived process would go like this:
Purchase a gift certificate and it adds to your balance, from which you can send it somebody, the problem is I can't find a way to buy one from the account. (This points me right back to how to purchase)
**
Gift Certificate FAQ BLURB:**
Gift Certificates are purchased just like any other item in our store. You can pay for them using the store's standard payment method(s). Once purchased the value of the Gift Certificate will be added to your own personal Gift Certificate Balance. If you have funds in your Gift Certificate Balance, you will notice that the amount now shows in the My Account page, and also provides a link to a page where you can send the Gift Certificate to someone via email.

Gift Certificate FAQ/How To Send Gift Certificates BLURB:
You may send a Gift Certificate from the My Account page. When you send a Gift Certificate you need to specify the following: The name of the person to whom you are sending the Gift Certificate; The email address of the person to whom you are sending the Gift Certificate; The amount you want to send (Note you don't have to send the full amount that is in your Gift Certificate Balance.); An optional short message which will appear in the email; Please ensure that you have entered all of the information correctly, although you will be given the opportunity to change this as much as you want before the email is actually sent.

13 Jan 2021, 23:05
#18
drbyte avatar

drbyte

Sensei

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

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

Out-of-the-box the gift certificate features work as described in original Zen Cart GV FAQs, and in the docs.

You're asking about how they work and quoting core ZC gift certificate FAQ pages ...... but you said you installed a separate plugin to add some sort of different gift certificate functionality ... and its own plugin-description says you don't need the built-in gift certificate module installed for it to work .... which suggests to me that it operates differently from what the core Zen Cart gift certificate features do.
So ... helping out in your situation is a bit of a moving target.

Questions that come to mind:
Why did you install a plugin for gift certificates in the first place?
Were the built-in features not working? Did you test those before making any changes to your store's files/database with a plugin?
How can we tell whether the problems you're having are related to things the plugin does differently vs simply not using the default features as intended?

13 Jan 2021, 23:12
#19
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

In an attempt to provide enhanced GV functionality to our developing site, I was intrigued by what the gift_certificate_addon offered and attempted to add the plugin.
I actually got some results with the plugin that, in the orig didn't seem to make much sense to a greenhorn such as myself.
As for your third question; I really don't know, hence my use of the forum. I have read some others posts that have a similar problem as in my question 1, but haven't stumbled upon a concise conclusion.

13 Jan 2021, 23:22
#20
drbyte avatar

drbyte

Sensei

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

Re: Plugin gift_certificate_addon - install.Sql issues ZC 1.57b

As explained in the docs, the Queue is for GVs ("Gift Vouchers"/Certificates that have been purchased by customers from the storefront and queued for review. Queuing is something you can turn on/off.

When sending using the Send GV screen, everything that's sent should normally show in the list of Sent.
Yes, customers must "have" a GV balance (redeemed a GV sent from the Admin, or purchased a GV in the storefront that was either never put in queue or has been queued and released by an admin) in order to "send" a GV to another person to redeem.

Products are only treated as GV's when their Product Model Number begins with "GIFT".