Skip to main content

Limit Reached message to include, item in cart

More
12 years 8 months ago #141805 by oharris
-- 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.

More
12 years 8 months ago #141831 by Mohamed Thelji
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 :
Code:
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.

More
12 years 8 months ago #141936 by oharris
Great. I found a solution. Thank you. <SOLVED>

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

Time to create page: 0.177 seconds
Powered by Kunena Forum