Identical Products with minor differences

  • Posts: 52
  • Thank you received: 2
8 years 6 months ago #237996

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.51
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Firefox

My wife wants to use Hikashop business for running her bookshop. It is unusual in that it only sells books by one author. The author wrote 20 books and my wife scours the net to collect these to sell, more as a resource for fans than any profit (maybe in a million years). Our problem is this.....

Each individual book is unique, one might be inscribed by the author, one may have a drawing by his wife, another, some unique feature someone might be looking for and obviously each book will be in a different condition. So, we need to have each and every book available as a separate product. The problem arises in that we might have 20 copies of each book and they obviously all have the same title so the product code generated causes an error, if we put our own code in the SEO alias generates an error and if we change that it messes up the SEO.
I realise this is an unusual situation, the fans of these books are very picky and want to see what they are getting, characteristics and variants won't cut it. I'm thinking we need a random product code generator but how will we solve the SEO alias?

Can anyone think of another solution? (Giving up is not a possibility!)

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 6 months ago #237998

Hi,

I don't see the problem in have different product codes and different aliases for each one.

If you don't want the check on the aliases you can remove the code:

if(!empty($product->product_alias)){
			$query = 'SELECT product_id FROM '.hikashop_table('product').' WHERE product_alias='.$this->db->Quote($product->product_alias);
			$this->db->setQuery($query);
			$product_with_same_alias = $this->db->loadResult();
			if($product_with_same_alias && (empty($product->product_id) || $product_with_same_alias!=$product->product_id)){
				$app->enqueueMessage(JText::_( 'ELEMENT_WITH_SAME_ALIAS_ALREADY_EXISTS' ), 'error');
				JRequest::setVar( 'fail', $product  );
				return false;
			}
		}
in the file administrator/components/com_hikashop/classes/product.php
However, in that case, you need to have the "remove categories and products ids from URLs" setting of the HikaShop configuration turned off. Because, without the id in the URL, the system can only rely on the alias to distinguish between the products and if several have the same alias, all the links will go the same product.

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

  • Posts: 52
  • Thank you received: 2
8 years 6 months ago #238134

Thanks Nicolas, I was just worried about any impact to SEO having either no or a made up alias might have. We'll leave it as is and just put our own codes and alias in.

Thanks once again.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum