7

Ok, firstly, i would say that you really want URL's that when human read make sense and also work in a content & shop scenario, i'm not sure that having category as the first segment is optimal. For example, a shop i have just developed has the url structure example.com/shop/product/product_name example.com/shop/category/category_name This means that ...


7

I wrote a simple plugin to do this and you can also use this plugin (I did not write rangee): http://devot-ee.com/add-ons/rangee


7

If your customers are required to have an account when you checkout I usually just check to see if the user has an entry in the orders channel. So I am going to assume that you have named your channel "orders" I would have something along the lines of: {exp:channel:entries channel="orders" author_id="CURRENT_USER" status="paid|open" disable="pagination|...


6

If you have any offsite gateways, it's very possible that a user clicks to go offsite ( to complete the transaction) and then cancels, or clicks the back button. And then submits the order again. Basically the first order was generated, but not completed… so it's processing. And it's never going to finish processing. Generally speaking, you should consider ...


6

I discovered the problem. We were using CartThrob's fingerprinting for sessions with the configuration set to "0" for the default fingerprinting method. The default method creates the fingerprint as: $fingerprint = $this->EE->input->server('HTTP_ACCEPT_LANGUAGE').$this->EE->input->server('HTTP_ACCEPT_CHARSET').$this->EE->input->...


5

Canada Post completely changed their e-commerce platform API in June of this year. I know the CartThrob plugin was in development quite awhile before that, and at that, I don't think it was given much attention. So my bet is it was never updated. I keep meaning to delve into building my own for the new API, as I am in Canada and work with many Canadian ...


5

One potential solution would be to switch your site URL to a protocol relative URL, i.e. instead of your Site URL being defined as http://mysite.com you could change it to simply //mysite.com. This way, when your browser requests cart.js it will request the https variant if you're on a secure page and the http one if you're not. If you take this approach ...


5

It would appear that there is a bug in CartThrob 2.2 with regards to managing inventory: http://cartthrob.com/forums/viewthread/7374/


5

Discounts are cumulative, where by default Coupons are not. HOWEVER, You can also change a hidden configuration variable to allow multiple coupon code usage. in cartthrob/config/config.php Change: 'global_coupon_limit' => '1', To whatever number you want.


5

We keep all of our downloadable files above web root, so they're not directly accessible, similar to this setup: /public_html /system /files And of course, we use Link Vault to obfuscate, protect against hot linking, and track the downloads.


5

Usually when creating a gateway that uses an html form to post directly to the payment service, we use both of the functions you mentioned. Here's the general overview: Inside the charge method Create the security hash/fingerprint if required For the return/redirect URL in the html form, use $this->response_script(__CLASS__) this will make use of a file ...


4

This URL schematic graphic is a great reference. Thanks to Jamessmith.co.uk:


4

If you open up the CartThrob member settings you can assign customer fields to custom member fields. These values then pre-populate through the CT checkout process. For example, on a site I built recently the CT settings look like this: Then, within my {exp:cartthrob:checkout_form} tag I have code like this: <input type="text" name="first_name" id="...


4

You can control what template a person gets sent to when they click on a button in the add_to_cart_form and you can also control what's on that template. The default templates that Cartthrob comes with are set up to have an update_cart_form, but you don't have to put that in there. Just include a form where you take the person's details inside a ...


4

You could use the is_in_cart tag for the conditional: {if {exp:cartthrob:is_in_cart entry_id="{entry_id}"}} in cart {if:else} not in cart {/if}


4

Yes. If you do not have EE's secure forms turned on, it's simple. If you have EE's secure forms turned on, you will need to pass a fresh XID hash each time you add a product. Our example store code (does not include ajax add to cart) includes ajax customer info updates, and has an example of refreshing the XID. That same method can be applied to adding items ...


4

If you use the example installation for CartThrob, the default templates have an example of a multi-page checkout: Assuming you do have that installed, you can go to: cartthrob settings > installation > template variables and set the checkout page to "shipping" and a shipping page will show up as the first step in the checkout. There's a lot going on in ...


4

I'm assuming you're using an {item_options} tag pair within your {exp:cartthrob:order_items} tags in your invoice template. Something like: {item_options} {option_name}: {option_value} {/item_options} Add a conditional to check for a "Site Id" {option_label} and only show the non Site Id options. {item_options} {if option_label != "Site Id"}{...


4

(I work at Vector; we own CartThrob) We haven't released an EE3 version yet but we're actively working on it and pretty close. We hope to share a more exact timeline with the community very shortly!


3

Are you trying to store custom data on member save or checkout? If so, you will need to add custom_data[custom_field_name] as the name for the input. I don't see anything in their docs about birthdays? You may want to use Profile:Edit along with CartThrob as it can save customer data to your member channel entries automatically.


3

Assuming PHP is enabled in your template, this should get you started... <select name="credit-card-expiration-year" id="credit-card-expiration-year"> <?php for($i = date("Y"); $i < date("Y")+10; $i++){ echo "<option>" . $i . "</option>"; } ?> </select>


3

In Cartthrob you can only apply one coupon code to your cart at a time. You'd need to provide a way for your user to remove the code and apply a different one instead.


3

You might want to take a look at the Freeway add-on so you can use conventional EE templating techniques but then route them via different URLs: https://github.com/averyvery/freeway I've never used it before myself, but looks pretty good. Otherwise, as John says, you'll need a whole heap of convoluted logic in your templates (which in turn will see you ...


3

You can access the order items as an array in the payment gateway: $items = $this->order('items'); foreach ($items as $item) { echo $item['item_options']['foo']; }


3

Can't you place a small if statement to make sure there is something in the cart and if empty redirect to main page where its added automagically. {if cart_empty}redirect{/if} not sure of syntax, purely demonstration


3

The issue was that in the setup the client had added a dollar sign to their prices. For some reason, CartThrob changes values with $ into 0 so the price update wasn't taking effect. tldr; ensure the prices within your Price Modifier field are numbers (float, ints, etc) only.


3

You might be able to try a {exp:cartthrob:cart_items_info} tag pair which loops through all the items in your cart. They have {cart_shipping} and {cart_shipping:plus_tax} tags available. So, you could work it out yourself using the Arithmetic tag. {exp:cartthrob:arithmetic operator="-" num1="{cart_shipping:plus_tax} num2="{cart_shipping}"}` Put it all ...


3

SUCCESS!!!!!! Admin > Security and Privacy > Security and Sessions > Allow members to change username was set to NO! Changed it to yes and voila! Erghh. Simple fix but should be documented somewhere! Hope this helps someone out there!


3

I had this issue myself. I uninstalled the HealthCheck accessory and viola - CT Settings! If you are using HealthCheck, you will have problems with CartThrob.


3

Have possibly found a solution, by retrieving the cart data direct from the database, decrypting and unserialising it I can obtain the cart data and see coupon codes applied, so am able to check against this. private function _getCart($cart_id) { $this->EE->load->library('encrypt'); $query = ee()->db->select('cart') ->from(...


Only top voted, non community-wiki answers of a minimum length are eligible