Limit Reached message to include, item in cart

  • Posts: 53
  • Thank you received: 0
11 years 4 months ago #141805

-- url of the page with the problem -- : http://http://2014conference.icac.org.jm/
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5

My "product" is a registration process.

The maximum purchase to be made in my shopping cart is 1. If someone attempts to purchase another product, it gives the Limit Reached message. In the language file my LIMIT_REACHED_REMOVED line reads: "Limit reached. Please complete previous registration before you can add: %s"

The %s being the actual product that they are trying to add.

But, I would like the message to also include the product that they currently have in their shopping cart. How can I do this?

So message may read as an example - "Limit reached. Please complete previous registration of Early Bird Registration - Members before you can add: Early Bird Registration - Spouse "

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #141831

Hi,
So the solution will probably be to :
1. Edit your file "administrator\components\com_hikashop\classes\cart.php" and change these lines to add the 2nd product name that is already in your cart :

	if( $displayErrors && $wantedQuantity > $quantity ) {
			$app = JFactory::getApplication();
			if( $quantity == 0 ) {
				$app->enqueueMessage( JText::sprintf( 'LIMIT_REACHED_REMOVED', $product->product_name));
			} else {
				$app->enqueueMessage( JText::sprintf( 'LIMIT_REACHED', $product->product_name));
			}
		}

2. Edit your translation word through your translation file : LIMIT_REACHED_REMOVED

The following user(s) said Thank You: oharris

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 0
11 years 4 months ago #141936

Great. I found a solution. Thank you. <SOLVED>

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum