-
Mod for value field for Gift Certificates
This mod-package is divided in two mods.
Value-Mod:
This mod makes it possible to have an input field set the value of a Gift Certificate. Intended to be use with the GV-Product_Type-Mod that uses a seperate Product Type for Gift Certificates.
GV-Product_Type-Mod:
This Mod creates a new Product Type, Gift Certificates. The new Product Type is based on the Free Shipping Product Type and is intended to be used with the Value-Mod in order to better control the look and behaviour of Gift Certificates.
The mod will be downloaded from the download section under Product Types.
Questions, comments and support are given in this thread.
Beez & vike
-
Re: Mod for value field for Gift Certificates
I installed the mods for the gift certificate, but I keep getting the error message:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /includes/classes/shopping_cart.php on line 383
I then overwrited the shopping_cart.php with the original one and the mod still didn't work. I tried this on new zen cart installations, and edited ones.
Can someone please give me some help on how to install the gv mod?
-
Re: Mod for value field for Gift Certificates
Quote:
Originally Posted by
Pierre
I installed the mods for the gift certificate, but I keep getting the error message:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /includes/classes/shopping_cart.php on line 383
I then overwrited the shopping_cart.php with the original one and the mod still didn't work. I tried this on new zen cart installations, and edited ones.
Can someone please give me some help on how to install the gv mod?
Hi there Pierre!
I discovered a similar problem when I moved to a server with an older php and MySQL, where the line
Code:
$mod_product_model = $db->Execute($mod_product_model_query)->fields['products_model'];
must be changed to
Code:
$mod_product_model = $db->Execute($mod_product_model_query);
$mod_product_model = $mod_product_model->fields['products_model'];
It seems that "$db->Execute" and "->fields" cant' be on the same line. You can try it your self or wait for an updated version to be posted shortly... The same kind of change needs to be on on several lines in shopping_cart.php and maybe in some other file.
Thank you for your feedback! Good luck!
-
Re: Mod for value field for Gift Certificates
Hi Beez.
Thanks for the support, it helped me alot. If anybody else also have this problem, you also need to edit the following lines in /includes/classes/shopping_cart.php
Line 742
Code:
$value_id =$db->Execute("select products_options_values_id
from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . "
where products_options_id = '" . $option_id . "'
limit 1
")->fields['products_options_values_id'];
change to
Code:
$value_id =$db->Execute("select products_options_values_id
from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . "
where products_options_id = '" . $option_id . "'
limit 1
");
$value_id = $value_id->fields['products_options_values_id'];
Line 931
Code:
$value_id =$db->Execute("select products_options_values_id
from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . "
where products_options_id = '" . $option_id . "'
limit 1
")->fields['products_options_values_id'];
change to
Code:
$value_id =$db->Execute("select products_options_values_id
from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . "
where products_options_id = '" . $option_id . "'
limit 1
");
$value_id = $value_id->fields['products_options_values_id'];
Line 1943
Code:
$mod_value_gift_model=$db->Execute($mod_value_gift_model_query)->fields['products_model'];
change to
Code:
$mod_value_gift_model=$db->Execute($mod_value_gift_model_query);
$mod_value_gift_model = $mod_value_gift_model->fields['products_model'];
Line 1949
Code:
$mod_value_gift_options_id=$db->Execute($mod_value_gift_options_id_query)->fields['options_id'];
change to
Code:
$mod_value_gift_options_id=$db->Execute($mod_value_gift_options_id_query);
$mod_value_gift_options_id = $mod_value_gift_options_id->fields['options_id'];
Line 1955
Code:
$mod_value_gift_options_type=$db->Execute($mod_value_gift_options_type_query)->fields['products_options_type'];
change to
Code:
$mod_value_gift_options_type=$db->Execute($mod_value_gift_options_type_query);
$mod_value_gift_options_type = $mod_value_gift_options_type->fields['products_options_type'];
Line 1986
Code:
$mod_value_gift_query_model=$db->Execute($mod_value_gift_query_model_query)->fields['products_model'];
change to
Code:
$mod_value_gift_query_model=$db->Execute($mod_value_gift_query_model_query);
$mod_value_gift_query_model = $mod_value_gift_query_model->fields['products_model'];
You also need to edit the file includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart_default.php
Line 95
Code:
$mod_product_model =$db->Execute($mod_product_model_query)->fields['products_model'];
change to
Code:
$mod_product_model =$db->Execute($mod_product_model_query);
$mod_product_model = $mod_product_model->fields['products_model'];
I hope this helps.
-
Re: Mod for value field for Gift Certificates
Exactly!
Thanx for typing it ;-)
-
Re: Mod for value field for Gift Certificates
I've uploaded a new version (1.1) with the changes above. It works with Zen Cart 1.3.6.
Thanx Pierre!
-
Re: Mod for value field for Gift Certificates
I am encountering a problem with this and the improved attributes controller and this working together...has anyone else encountered this problem.
Thanks in advance....
-
Re: Mod for value field for Gift Certificates
I'm not using that mod so I can't help you with that. If you manage to get it to work, please let us know.
Good luck!
-
Re: Mod for value field for Gift Certificates
A new version is uploaded. The new version (1.2) is updated so that the value of gift certificates in the shopping cart is shown in the value field.
The new version will located in the download section once it has been approved.
-
Re: Mod for value field for Gift Certificates
This might work for multiple quantity boxes, but I am not sure. Can the numerical number entered into the text box act as a quantity amount too. So say a shirt is $5 and they want to order 10 smalls 10 medium and 5 larges WITHOUT having to go back and forth from the shopping cart. The question is can I have this new text input option increase the quantity based on the number they enter?
Thanks,
Brad
-
Re: Mod for value field for Gift Certificates
are both mods required for use of the value mod?
-
Re: Mod for value field for Gift Certificates
I need to provide the ability for visitors to buy gift certificates in any amount, and this mod looks to be exactly what I need. However, I can't get it to work. I was able to install it without any problems, but when I go to my Gift Certificate item there's no option to enter a value. What else do I have to do? The directions aren't very clear on the use.
Thanks!
-
Re: Mod for value field for Gift Certificates
Quote:
Originally Posted by
bradlawson
This might work for multiple quantity boxes, but I am not sure. Can the numerical number entered into the text box act as a quantity amount too ... The question is can I have this new text input option increase the quantity based on the number they enter?
No.
You could perhaps rewrite this mod but rather find a mod which behavior is more like what youre after.. or write your own from 'scratch'..
We can make it for you if you make it worth our while :)
-
Re: Mod for value field for Gift Certificates
Quote:
Originally Posted by
samad64
are both mods required for use of the value mod?
Sorry for the delayed answer, but no, not really... But we created a new product type mostly to make it easier. You can look at the first post in this thread and in the install.txt in the mod-package for more info on how it works.
If you any more questions, just ask!
-
Re: Mod for value field for Gift Certificates
Quote:
Originally Posted by
rogersmj
I need to provide the ability for visitors to buy gift certificates in any amount, and this mod looks to be exactly what I need. However, I can't get it to work. I was able to install it without any problems, but when I go to my Gift Certificate item there's no option to enter a value. What else do I have to do? The directions aren't very clear on the use.
Thanks!
Have you installed both the GV-Product_Type-Mod and Value-Mod?
Have you read the install-files for both mods, especially the "Configure the Shop" part?
Get back if you can't make it work and good luck with your shop!
-
Re: Mod for value field for Gift Certificates
I was following the steps in the text file "install_value-mod_137.txt" to "Configure the Shop" but I got an error when I was trying to add a new attribute. Here's the error message I got: "Attribute Option and Option Value Do NOT Match - Attribute was not added - : TEXT".
Here are the steps I took:
- Went to Catalog->Option Name Manager
- Entered the text "Value" in the Option Name field.
- Selected "Value" in the drop down list under option type
- Went to Catalog->Attributes Controller
- Selected Categories: - Gift Certificates (created previously)
- Selected the Gift Certificate product
- In the "Adding New Attributes" section, I clicked "insert". Option Name was "Value [Value]" and Option Value was "TEXT [RESERVED FOR TEXT/FILES ONLY ATTRIBUTES]
Then I got the error message. Please let me know what I may have done wrong.
Thank you guys!
-
Re: Mod for value field for Gift Certificates
Thanks for the excellent description of your steps. Unfortunately we're unable to reproduce your error.
Could you please try and remove the entry in Admin->Options Name Manager. You can also try and remove the product itself too and create a new. Then add the option name again in the Option Name Manager and then go to Attributes Controller and choose your product and select "Value" from the Option Name and don't select anything in the Option Value-field. Click Insert. Still the same error?
You are sure you have got all the changes in the modded files?
Good luck and please let us know how it turns out.
-
Re: Mod for value field for Gift Certificates
Thanks a lot Beez. I have since opted to sell gift certificates at $25, $50 and $100 and I'm happier with that.
I appreciate your response.
-
Re: Mod for value field for Gift Certificates
Good for you! Thanx for the update.
-
Re: Mod for value field for Gift Certificates
Thanks for the great mod. I love it. However, I was just testing it in my test cart and discovered that whenever the shopping cart is updated/refreshed after removing other products, the GV value gets changed to 0.00. I've tried this several different ways, going through the steps in a different order and the result is always the same.
Any ideas what is happening?
-
Re: Mod for value field for Gift Certificates
I have installed this mod along with product stock from attributes.
When I goto checkout I get a warning that the product is out of stock.
Any ideas? I spent most of the night manually merger all the files into my code so I dont want to have to remove it.
Thanks again for this mod.
-
Re: Mod for value field for Gift Certificates
I am also noticing that the update does not work. I am getting 000 values when the cart is updated. I managed to disable stock check on all items that are called Gift Certificate in the header for shopping cart
I think i see what happened in the code for update
its looks like someone had a problem getting it to work and set a disable feature on the update option at the top
hmm anyone know to fix update?
-
Re: Mod for value field for Gift Certificates
I'm having an odd issue after installing this mod. On Step 3 of checkout, the confirmation page, nothing shows now under Payment Method. It just says Payment Method: but the actual method doesn't show. It used to show up, anyone else have this issue? I've compared the files and I just don't know what is wrong :(
-
Re: Mod for value field for Gift Certificates
Never noticed how this MOD was in such demand. How would you guys like to have my additional gift certificates fields as a MOD ? If interested, I could add this into my to-do list. This seems pretty easy rather than always to have to customize each related SQL statements now that my module is fully functional over Zen-Cart don't you think ? :wink2:
Please, let me know.
-
Re: Mod for value field for Gift Certificates
Quote:
I am encountering a problem with this and the improved attributes controller and this working together...has anyone else encountered this problem.
It's been a while since the above was posted, but I also have run into problems incorporating this mod into the improved attributes controller.
The specific problem is that when a new attribute (not GV) is added to a product, the options value is not inserted. I get an attribute that shows the option name/price/weight/etc, but no option value. Actually in my database, it shows options_values_id=0. There are other people posting the same problem in the Improved Attributes Controller thread. I'll ask them if they are using the GV Value mod also.
I don't know enough about php to decipher the code, but is there a chance that there is something in this modification that would cause that particular behavior?
If not, perhaps there is something in the Improved AC that is conflicting with it?
-
Re: Mod for value field for Gift Certificates
I am having the same problem as THUNBUG. I followed the steps in the text file "install_value-mod_137.txt" to "Configure the Shop" exactly (tried it three times). However when I try to add the Attribute to the product, "Attribute Option and Option Value Do NOT Match - Attribute was not added - : TEXT". is displayed in red on top of the screen.
This is exactly what I have done:
Went to Catalog->Option Name Manager
Entered the text "Value" in the Option Name field.
Selected "Value" in the drop down list under option type
Went to Catalog->Attributes Controller
Selected Categories: - Gift Certificates (created previously)
Selected the Gift Certificate product
In the "Adding New Attributes" section, I clicked "insert".
Option Name was "Value [Value]" and Option Value was "TEXT [RESERVED FOR TEXT/FILES ONLY ATTRIBUTES] are pre-populated, can't edit those field (or at least I don't know how). Didn't change anything else.
Also followed your advice:
Could you please try and remove the entry in Admin->Options Name Manager. You can also try and remove the product itself too and create a new. Then add the option name again in the Option Name Manager and then go to Attributes Controller and choose your product and select "Value" from the Option Name and don't select anything in the Option Value-field. Click Insert. Still the same error?
There isn't a way to "not select anything in the Option Value-field", it has TEXT [RESERVED FOR TEXT/FILES ONLY ATTRIBUTES] in it and you can't remove it.
I have configured the option name and tried to use it for Attributes Controller, but perhaps I am missing a step (not included in the instructions) for option value?
Please advise, I would love to use this mod but I cannot get it to work.
Mike
-
Re: Mod for value field for Gift Certificates
Nevermind, figured it out
You have to click on the text Value under Option Name to select/highlight it, I didn't know that. As long as you click on that and leave the other one alone (TEXT under Value) it add it like you described.
Thank you, great mod so far, just didn't get the Attributes part (never used that before)
I tried adding a value of 0.00 to get it to work and that worked as well.
Mike
-
Re: Mod for value field for Gift Certificates
Gift Certificates not working with this mod. If I purchase a GC, I am allowed to add it to my cart, set the value (great idea for this mod BTW), and then submit payment via PayPal. However, when I confirm my order I get a receipt from PayPal, one from the store, but nothing with a code in it for a Gift Cert.
There is nothing in the queue either nor nothing listed in GC's sent. Any idea why or what I might have done wrong???
Mike
-
Re: Mod for value field for Gift Certificates
Quote:
Originally Posted by
speeduneed
its looks like someone had a problem getting it to work and set a disable feature on the update option at the top
sorry not to have read your posts before we had to trace it down as well - being a while since we worked on it last, erhm. but you're right, it was there and its fixed.
yay
version 122 uploaded to contributions now
Beez & vike
-
Re: Mod for value field for Gift Certificates
Quote:
Originally Posted by
vegascoug
There is nothing in the queue either nor nothing listed in GC's sent. Any idea why or what I might have done wrong???
Mike
Hi Mike!
It should work with all payment modules. It works with the ones I've tested even though I haven't tested with PayPal yet. The Mod doesn't affects any payment modules and our Gift Certificate works like the ordinary GC. Are you sure you have configured everything correct? Don't forget that all Gift Certificates must have model "GIFT-" in the beginning. e.g "GIFT-01".
Good Luck!
-
Re: Mod for value field for Gift Certificates
Hello there,
Installed the latest mod, I am having problems with the mod. I am at attribute controller, with the gift voucher product I have made.
I select Value [VALUE] and leave the option side alone. I get the following:-
Attribute Option and Option Value Do NOT Match - Attribute was not added - : TEXT
I looked at what Vegascoug wrote and he seems to get it to work.
Could it be a clash of mods or have I missed. Sqls are updated and all files are compared.
Many thanks in advance,
Heathenmagic :smile:
-
Re: Mod for value field for Gift Certificates
I can't reproduce your error with the latest version, 1.22. Try apply it again. What other mods have you installed?
Please get back to us, with your progress. Good luck!
-
Re: Mod for value field for Gift Certificates
Hello Beez,
Thanks for the heads up. It was another mod causing the problem. If anybody gets an error during attributes, and has dual pricing installed there is some code that was missing from the install files.
Anyhow it works great, many thanks!
Heathenmagic :smile:
-
Re: Mod for value field for Gift Certificates
Quote:
Originally Posted by
HeathenMagic
Hello Beez,
Thanks for the heads up. It was another mod causing the problem. If anybody gets an error during attributes, and has dual pricing installed there is some code that was missing from the install files.
Anyhow it works great, many thanks!
Heathenmagic :smile:
Heathenmagic, could you please elaborate on the code issue with the dual pricing and attributes? What was missing and what did you do to correct it?
Thanks!
Matt
-
Re: Mod for value field for Gift Certificates
Sure that no problem. If you go this link:-
http://www.zen-cart.com/forum/showth...=35450&page=15
look for post 150, it will highlight the code needed if you have the same setup as me.
Regards,
Heathenmagic :smile:
-
Re: Mod for value field for Gift Certificates
This module does not show the attribute name in the shopping cart. It shows only the - value
- 100
It should be like:
Custom Value - 100
or something like that. Does anyone know how to fix it?
-
Re: Mod for value field for Gift Certificates
Hello,
I set up my Gift certificates using this mod, however when I go to place the amount I want to buy and click 'add to cart' the amount in my Cart always shows as 0.00.
Any ideas why the value I entered is not being picked up?
thanks.
I'm using zen cart version 1.3.8
-
Re: Mod for value field for Gift Certificates
We've just submitted a new version of the mod. It mostly a update to the files from Zen cart 1.3.8a. there's also three modified templates to remove the entered value in shopping cart, checkout and account history.
The new version should be found here: http://www.zen-cart.com/index.php?ma...roducts_id=322
-
Re: Mod for value field for Gift Certificates
I have installed the mod and configured the new product. When I select the gift certificate product to be added to my cart, I enter the dollar amount in the box, but when I checkout the price for the certificate is 0. It sound like I have the attribute configured incorrectly, but I am not sure. Any ideas?
Thanks.
-
Re: Mod for value field for Gift Certificates
I had to change the option type from Text to Value.
Thanks.
-
Re: Mod for value field for Gift Certificates
Hi,
Is there an sql uninstall script available? I like the mod, but I have some other modules that are conflicting with it, so it has to go.
Thanks.
Bill
-
Re: Mod for value field for Gift Certificates
I have installed both parts of this and have followed the instructions to the letter. But when I pull up the gift certificate in the cart it crashes the page.
http://www.enlita.com/shop/index.php...roducts_id=500
Can someone lend some insight:frusty:
-
Re: Mod for value field for Gift Certificates
When I added the attribute to a product it ended up displaying as a radio button with a label Text as seen in the image below. I updated the MySQL tables and added all the files. Do you have any idea what could be the problem. Also, the Product - Gift Certificate does not even display anything when I click the product. Do I have to specifically configure it? I am using Zen Cart 1.3.9e but have tried it on Zen Cart 1.3.8a and had the same results.
http://kepler.covenant.edu/~dinouye/...screenshot.jpg
Thanks in advance for your help.