Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43
  1. #1
    Join Date
    Sep 2005
    Location
    Malmö, Sweden
    Posts
    120
    Plugin Contributions
    4

    Default 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
    Last edited by Beez; 5 Oct 2006 at 01:55 PM.

  2. #2

    Default 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?

  3. #3
    Join Date
    Sep 2005
    Location
    Malmö, Sweden
    Posts
    120
    Plugin Contributions
    4

    Default Re: Mod for value field for Gift Certificates

    Quote Originally Posted by Pierre View Post
    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!
    Last edited by Beez; 31 Oct 2006 at 01:01 PM.

  4. #4

    Default 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.

  5. #5
    Join Date
    Sep 2005
    Location
    Malmö, Sweden
    Posts
    120
    Plugin Contributions
    4

    Default Re: Mod for value field for Gift Certificates

    Exactly!

    Thanx for typing it ;-)

  6. #6
    Join Date
    Sep 2005
    Location
    Malmö, Sweden
    Posts
    120
    Plugin Contributions
    4

    Default 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!

  7. #7
    Join Date
    Feb 2006
    Posts
    24
    Plugin Contributions
    0

    Default 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....

  8. #8
    Join Date
    Sep 2005
    Location
    Malmö, Sweden
    Posts
    120
    Plugin Contributions
    4

    Default 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!

  9. #9
    Join Date
    Sep 2005
    Location
    Malmö, Sweden
    Posts
    120
    Plugin Contributions
    4

    Default 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.

  10. #10
    Join Date
    Oct 2005
    Posts
    78
    Plugin Contributions
    0

    Default 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

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. Replies: 2
    Last Post: 24 Nov 2012, 02:48 AM
  2. Searching a cart for Gift Certificates (GIFT-XXXX)
    By retched in forum Contribution-Writing Guidelines
    Replies: 7
    Last Post: 12 Aug 2010, 02:58 AM
  3. total value of Gift Certificates in cart
    By gilby in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 25 Jun 2010, 03:14 AM
  4. Gift Certificates for a Product mod
    By zb21hay in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 4 Mar 2008, 10:30 PM
  5. Turn off Gift Wrap for Gift Certificates
    By tammy_kenny in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Jul 2006, 12:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR