CartThrob Forums 0 Copyright (c) 2013 ExpressionEngine tag:cartthrob.com,2013:02:20 Ideal tag:cartthrob.com,2013:forums/viewthread/.8431 2013-02-20T00:08:52Z 0 77120 where did the https://github.com/ho-nl/ee_cartthrob_ideal_lite go?

i can only find one for the rabobank on github now.

]]>
Discount plugin for percentage/amount off per item quantity threshold tag:cartthrob.com,2012:forums/viewthread/.7548 2012-12-12T10:03:16Z 0 reusserdesign I’m looking for a discount that will check each item in the cart and apply a discounted rate if the item is at or above a specified quantity.

If the next item is not at the specified quantity, then the item is not discounted.

Thanks All

]]>
Validating your add_to_cart form or check_out form with JavaScript quick set up. tag:cartthrob.com,2012:forums/viewthread/.7174 2012-10-30T00:41:53Z 2012-10-30T00:54:07Z vlad_i The more I work with cart throb the more I love it.

I was about to get really pissed off and whine that there was no option for ID=”” in the add_to_cart form… but then I tried it and it worked. (Chris or CT admins should add this to the notes)
http://cartthrob.com/docs/tags_detail/add_to_cart_form/index.html

Now I am dumb as a rock, so when I make sites I want it simple.
I use a JS validator for most of my forms that requires ID, hence my initial anger, until I discovered it works.

Here is the link to the JS I use for validation: http://www.javascript-coder.com/html-form/javascript-form-validation.phtml

This one satisfies all my cart throb needs because it can check for things numerical vs text entries etc, and compare 2 fields like “same password” in the passwords fields, etc.

Here is my simple JS code for the add to cart form:

JS-tag
                    
//You should create the validator only after the definition of the HTML form
                      
var frmvalidator  = new Validator("validate");
                    
                       
frmvalidator.EnableMsgsTogether();
                        
frmvalidator.addValidation("quantity","req","Please enter Number of tickets");
                        
frmvalidator.addValidation("quantity","num""Please Use Numbers Only");
                        
frmvalidator.addValidation("quantity","leelmnt=hidden1","Please select {tickets_remaining} tickets or less"); 
                    
[removed]
/JS-tag 

I do not want to allow the user to enter a number that is higher than the inventory. I do this by comparing it to a hidden field. Here is my CT code:

{exp:cartthrob:add_to_cart_form 
  entry_id
="{entry_id}" 
  
return="{segment_1}/cart"
  
id="validate"
                     
<label >Seats:</label
// Use a little bit of inline JS to let them know how many items are left.  
// Some thing like this onclick="if (this.value == 'Maximum {tickets_remaining}') {this.value='';}"
// Since my validator is set to numbers only prevents accidental clicks. But when they click on the field the text disappears 
                         
<input name='quantity' class="quantity" type="number" max="{tickets_remaining}" value="Maximum {tickets_remaining}"  />
                      </
div>
// hidden field that has the number of items that the validator compares it too, prevents people from entering more items than there are left
                    
<input name='hidden1' type="hidden" value="{tickets_remaining}"  />
                        <
input type='submit' class="button1" value='Register  >' />
{/exp:cartthrob:add_to_cart_form} 

Now JS isn’t full proof, but this is a clean way to avoid those EE error pages.

Hope this helps someone!

:D

]]>
Using custom order field with extension. tag:cartthrob.com,2012:forums/viewthread/.6013 2012-08-13T07:55:04Z 0 iapparatus Hi, I’m saving some data in the custom ‘order_notes’ field in ‘orders’ channel by adding

<input type="hidden" value="my data here" name="order_notes" /> 
to checkout_form and it works fine but I’m unable to acces it from my custom extension with on_authorize hook like so:
$event_id $this->EE->cartthrob->cart->order('order_notes'); 

All of these work fine though:

$order_id $this->EE->cartthrob->cart->order('order_id');
$first_name $this->EE->cartthrob->cart->order('first_name');
$last_name $this->EE->cartthrob->cart->order('last_name');
$company $this->EE->cartthrob->cart->order('company');
$card_type $this->EE->cartthrob->cart->order('card_type'); 

Should I be doing something else?

]]>
Trying to use hook ‘product_reduce_inventory’ tag:cartthrob.com,2012:forums/viewthread/.5815 2012-07-15T08:51:00Z 0 johndwells Hi Chris,

I’m trying to work with the ‘product_reduce_inventory’ hook (http://cartthrob.com/docs/developers/hooks/index.html#product_reduce_inventory), but am having trouble -  it appears as though Cartthrob does not call that hook for 3rd party extensions.

In Cartthrob_product.php, around line 58 is the reduce_inventory() method, which sets a core hook ‘product_reduce_inventory’, which is defined in Cartthrob_core_ee.php, around line 956.  However within this method, there is no attempt to look for another extension registered to that hook (e.g. $this->EE->extensions->active_hook(‘product_reduce_inventory’) etc…).

Should I be attempting to use this hook in another manner?

Cheers,
John

p.s. I’m trying to use this hook to change the status of a product to “Closed” if the inventory gets reduced to zero.  Am I’m on the right track?

]]>
hook for dynamically/on-the-fly password protecting or watermarking a download protected file tag:cartthrob.com,2012:forums/viewthread/.5330 2012-04-22T15:11:35Z 0 botkiller I would like to set a password or create a watermark on-the-fly using pdftk when a customer uses the protected download link to get their purchased pdf. The input for the password or the watermark would be the customers name. Is there a hook that could be made available or one that is suggested? This would be akin to ejunkie’s pdf stamping mechanism. Any suggestions on how to proceed?

]]>
HSBC payment plugin tag:cartthrob.com,2012:forums/viewthread/.4736 2012-02-10T05:08:18Z 0 ianryde Hi, anyone had any joy with a HSBC payment plugin for the UK? PM me with details if you are available to help me out?

]]>
Anyone available to build an extension? tag:cartthrob.com,2012:forums/viewthread/.4535 2012-01-18T04:49:07Z 2012-01-18T06:26:12Z Andy Doran Hello

I’m looking to get some custom extension work done - Hope it’s ok to post this here.

Basically I need some database tables updating from within the on_authorize hook. If it was just in php I could do it, but I haven’t touched codeignitor before, so I’m looking for someone who could write the code. Let me know your rates - you can PM if you prefer.

Thanks

Andy

]]>
CT Admin tag:cartthrob.com,2011:forums/viewthread/.3170 2011-07-28T10:33:39Z 2011-08-01T14:44:20Z rlwsota I’m looking at options for printing packing slips to send with each shipment.  Unfortunately, exporting to Quickbooks is a pain, especially as the customer base grows (if anyone can suggest a quick way, please do so!), so a solution withing EE/CT would be preferred.  I’m on a Mac, so the ConsoliBYTE solution doesn’t work for me.

I found an add-on called CT Admin that offers some immediate printing options (invoices, reports) and then saw that Chris N was evaluating a copy (http://cartthrob.com/forums/viewthread/2738/).  Looks like a pretty good solution for some of the missing parts within CT.

Wondering if anyone has experience with the add-on?  Chris, did you get a chance to evaluate it?

]]>
Buy # for $ discount tag:cartthrob.com,2011:forums/viewthread/.2945 2011-07-07T17:49:48Z 0 Vexea Is it possible to setup a discount where a customer can buy, for example, two products for $35 (set price, not $ off)? I was looking at the get X for X but that doesn’t seem like the correct discount.

]]>