Jump to content

Stop customer buying the same product again


Cpup

Recommended Posts

Hi,

I'm selling digital music downloads and I need a feature that tells the customer if they've already purchased an item.

If trying to buy a track it tells the customer in the basket something like "You've already purchased {item_name}" and/or "Are you sure you wish to continue?" like with a used once promo code

Is this possible?

If not, I think this would be a great feature as over time, if you have a lot of downloads, it's easy to forget what you've already purchased without trawling through your downloads list

Link to comment
Share on other sites

Interesting. I am sure it can be done.

Do you allow non-account-holding customers (aka, Ghost customers) to make purchases? If so, that might throw a few obstacles into the mix as CubeCart won't know who the customer is until going through checkout (and submitting an email address).

 

Link to comment
Share on other sites

Hi @bsmither,

The store is offline at the moment while testing. But before it goes live, I only want registered customers only, but all I can see in store settings is Hide prices until logged in, but I still want prices shown. Is there an extra setting for this?

Link to comment
Share on other sites

There is no direct setting that will show prices, but prevent ghost customers from making purchases.

However, by using Catalogue Mode plus a Code Snippet, a solution can be found.

Catalogue Mode (admin, Store Settings, Features tab, Misc section, "Disable Checkout") removes the ability for anyone to actually make a purchase.

The Code Snippet will switch off Catalogue Mode when a customer logs in for that logged-in customer.

In admin, Manage Hooks, Code Snippet tab, click Add Snippet.
A form will be presented:
Enabled: checked
Unique ID: NotCatMode4LoggedIn@cc640+
Execution Order: 99
Description: Switches off Catalogue Mode for that logged-in user.
Trigger: class.user.load.user
Version: 1.0
Author: https://forums.cubecart.com/topic/57901-registration-to-be-approved/
Code:
<?php
/* Uses the hook 'class.user.load.user' located in code that
 * runs when a user gets logged in.
 * In admin, enable Catalogue Mode.
 * These statements will disable catalogue mode and have
 * the templates resume normal behavior for this user.
 */
 
 $GLOBALS['config']->merge('config', 'catalogue_mode', false);
 $GLOBALS['smarty']->assign('CATALOGUE_MODE', false);

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...