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

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

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

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

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

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


3

I see you're already attempting to grab the new XID from the return data of the Ajax call: // update the XID hash in the form so we don't run afoul of EE's secure forms $("input[name=XID]").val(response.XID); But I fell onto this documentation the other day which I think is new and relating to new EE version handling. Seems like if submitted by Ajax the ...


3

Just made simple ext which will check users email at the end of registration and if user email domain is in white list - send them validation email. After validation put them into the group which has full access. hooks: member_member_register member_register_validate_members


3

After a few weeks of attempting to track down this bug, we finally found the culprit was misconfigured cookie_domain setting. In our config file, we dynamically set the cookie domain so cookies work with our various MSM sites: $config['cookie_domain'] = '.' . preg_replace('#^www\.(.+\.)#i', '$1', $_SERVER['HTTP_HOST']); During our server switch,...


3

We have fixed this with a couple of changes, seems Cartthrob has a couple of issues... 1) Based on this post XID POST from third party we added the we added 'csrf_exempt' => 1 into the database for the payment_return_action in the Cartthrob exp_actions table. We do not know if this helped, but seems like we should do it. Carttrhob does not add this in when ...


3

I've not seen that before. Odd one! Take a look here at sample code for setting status from that hook. Maybe it will provide some direction. https://github.com/CartThrob/extension-change_product_status In theory, sagepay should hit the callback url on payment complete (extload.php) and POST it the payment status flag (Y,C etc) which CT then interprets into ...


3

Sounds like a poorly coded template... First, you should aim to refactor it using the multi_add_to_cart_form instead of the simple add_to_cart_form: http://cartthrob.com/docs/tags_detail/multi_add_to_cart_form/index.html This will give you a single form for all 6 products so should reduce CT's load by 6X. You should then look into other optimisations and ...


3

From looking at the CI_Encrypt source code, I noticed that _xor_encrypt is only used when the PHP mcrypt module is not installed. I installed the PHP mcrypt module and added it to php.ini, which seems to have substantially reduced the time required to run this function. Note: I'm still having some slowness due to this module (much less than before), ...


3

The answer to this lay in the Varnish configuration. Basically, in the vcl_recv function, I created my logic for whether to "lookup" (check the cache, fetch from the backend if the cache is empty), or "pass" (always serve from the backend). Then in vcl_pass, I added an HTTP header to the request indicating "this request was passed and should never be cached"...


3

Your best bet would be to attempt to repair the table via a database management utility outside of the EE control panel. Does your web host offer anything like a PHPMyAdmin interface, or do you have any experience with standalone MySQL clients like Sequel Pro? Those utilities should expose table repair functionality. I'd start there first. Before you ...


3

There's a bug in CartThrob core files causing this. It's been corrected for the next release. You can go to: cartthrob > cartthrob > core > Cartthrob_cart.php find: public function find_item(array $data) { return current($this->filter_items($data)); replace with: public function find_item(array $data) { $filtered_items = $this->...


3

You can just add it into your my.conf: max_join_size=# sql_big_selects=1 but is better to ask CT Admin dev team to add it into code.


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