Product Variants - Access Level Issues

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215060

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.4.36-0+deb7u1
-- Browser(s) name and version -- : Chrome

Hopefully this is just me getting a bit confused and mixing things up!

I have two sets of prices - wholesale prices, which I intend to assign to all "Business" users, and retail prices, for guests, registered users etc.

These are the site's user groups:

Public
- Business
- Guest
- Manager
- Registered
- - Author
- - - Editor
- - - - Publisher
- - Super Users

Let's say the wholesale price is $15 inc GST - the following I have checked for the variant's ACLs:
Public - Yes
- Business - Yes
- Guest - No
- Manager - No
- Registered - No
- - Author - No
- - - Editor - No
- - - - Publisher - No
- - Super Users - No

And the retail price may be $20 inc GST - the following I have checked for the variant's ACLs:
Public - Yes
- Business - No
- Guest - Yes
- Manager - Yes
- Registered - Yes
- - Author - Yes
- - - Editor - Yes
- - - - Publisher - Yes
- - Super Users - Yes

My test business account is part of the following user groups:
Business and Registered

However - when looking at the page - the Business account is still only seeing the $20 Retail price, and not the $15 Wholesale price.

Is there any issue with my access level ordering, or is it perhaps an issue with the user having multiple access levels?

Thanks heaps :)

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

  • Posts: 84306
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #215077

Hi,

That's a bug of the current release I think.
We've added a patch since the release to fix that.
Please download the install package of the current version via the menu My account>My subscriptions on our website and install it on your and that will add the patch to fix that.

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

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215175

Good to know that it might be a bug :)

Unfortunately I get this error whenever I try to update:

" Table 'fw.pftvd_falang_content' doesn't exist SQL=UPDATE pftvd_falang_content SET published=0 WHERE reference_field IN ('size','type','freshwatersaltwater','floatingsinking') AND reference_table='hikashop_product'"

Any thoughts?

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 11 months ago #215203

Hi,

Please edit the file "administrator/components/com_hikashop/helpers/update.php" and replace

		if(!empty($unpublish)){
			foreach($unpublish as $k => $v){
				$unpublish[$k] = $db->Quote($v);
			}
			$db->setQuery('UPDATE #__falang_content SET published=0 WHERE reference_field IN ('.implode(',',$unpublish).') AND reference_table='.$db->Quote('hikashop_'.$types[$file]['type']));
			$db->query();
		}

		if(!empty($publish)){
			foreach($publish as $k => $v){
				$publish[$k] = $db->Quote($v);
			}
			$db->setQuery('UPDATE #__falang_content SET published=1 WHERE reference_field IN ('.implode(',',$publish).') AND reference_table='.$db->Quote('hikashop_'.$types[$file]['type']));
			$db->query();
		}
By
	if(false) {
		if(!empty($unpublish)){
			foreach($unpublish as $k => $v){
				$unpublish[$k] = $db->Quote($v);
			}
			$db->setQuery('UPDATE #__falang_content SET published=0 WHERE reference_field IN ('.implode(',',$unpublish).') AND reference_table='.$db->Quote('hikashop_'.$types[$file]['type']));
			$db->query();
		}

		if(!empty($publish)){
			foreach($publish as $k => $v){
				$publish[$k] = $db->Quote($v);
			}
			$db->setQuery('UPDATE #__falang_content SET published=1 WHERE reference_field IN ('.implode(',',$publish).') AND reference_table='.$db->Quote('hikashop_'.$types[$file]['type']));
			$db->query();
		}
	}
It will fix your issue.
In the same time, we will create the appropriate patch and include it as an "hot fix" in HikaShop 2.6.0.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215216

Hmm - it doesn't seem to be having any effect. Can I please confirm that the code (including surrounding code) will look like this?

}
			if($oneExtraField->field_type == 'wysiwyg') {
				$field = $xml->reference->table->addChild('field', $fieldTitle);
				$field->addAttribute('type', 'htmltext');
				$field->addAttribute('name', $fieldName);
				$field->addAttribute('translate', '1');
			}
		}

			if(false) {
		if(!empty($unpublish)){
			foreach($unpublish as $k => $v){
				$unpublish[$k] = $db->Quote($v);
			}
			$db->setQuery('UPDATE #__falang_content SET published=0 WHERE reference_field IN ('.implode(',',$unpublish).') AND reference_table='.$db->Quote('hikashop_'.$types[$file]['type']));
			$db->query();
		}

		if(!empty($publish)){
			foreach($publish as $k => $v){
				$publish[$k] = $db->Quote($v);
			}
			$db->setQuery('UPDATE #__falang_content SET published=1 WHERE reference_field IN ('.implode(',',$publish).') AND reference_table='.$db->Quote('hikashop_'.$types[$file]['type']));
			$db->query();
		}
	}

		$xml->asXML($destination);
	}

	function addUpdateSite(){
		if(version_compare(JVERSION,'1.6.0','<')) return false;
		$config = hikashop_config();
		$newconfig = new stdClass();
		$newconfig->website = HIKASHOP_LIVE;
		$config->save($newconfig);
		$query="SELECT update_site_id FROM #__update_sites WHERE location LIKE '%hikashop%' AND type LIKE 'extension'";
		$this->db->setQuery($query);
		$update_site_id = $this->db->loadResult();
		$object = new stdClass();
		$object->name='Hikashop';
		$object->type='extension';

Thanks for all your help, by the way :)

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 11 months ago #215219

Hi,

Please redownload HikaShop 2.6 it will be easier.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215273

Unfortunately I still get the error ( 1146 Table 'fw.pftvd_falang_content' doesn't exist SQL=UPDATE pftvd_falang_content SET published=0 WHERE reference_field IN ('size','type','freshwatersaltwater','floatingsinking') AND reference_table='hikashop_product') when installing it (regardless of whether I change the code - which seems to be overridden once I install it again, despite the error).

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

  • Posts: 84306
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #215306

Hi,

You don't need to change any code.
The fix was added in the install package on our website. That's why you need to redownload it in order to get the patch in the back/helpers/update.php file of the package so that when you install the new version of the package, you don't get the error.
If you still have it, there is a high chance that you're not using the new package we put on the website after you reported the issue.

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

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215310

Can I please confirm whether you mean Hikashop Starter or Hikashop Business? I have downloaded the Hikashop business again however am still getting the error.

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 11 months ago #215315

Hi,

Do you have Joomfish or Falang installed in your website ?
Or does one of these components has been installed before ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215453

Hi there - as far as I am aware, neither of those extensions have been installed on the website.

Thanks :)

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

  • Posts: 84306
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #215456

Hi,

If you have that error, it means that you have either the folder administrator/components/com_falang or administrator/components/com_joomfish on your website. So you probably had one of them installed before, one way or another.
Rename the folder via FTP and try again and you shouldn't get the problem.

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

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215500

Hi there - thanks heaps :) That appears to have fixed it!

It now shows two prices instead of one (so shows both the retail and wholesale price) - is it possible to get it to only show the wholesale price to a business user (even if the user is in multiple groups)?

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 11 months ago #215501

Hi,

The "retail price" is just an informative price and does not replace the product prices.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 24
  • Thank you received: 0
9 years 11 months ago #215983

Do you have any suggestions on how to make it appear less confusing? As for the wholesale user there is no indication as to what the two different prices mean.


Attachments:

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

  • Posts: 84306
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #216025

Hi,

You can edit the file "listing_price" of the view "product" via the menu Display>Views in order to customize the price display the way you want and make it clearer for your need.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum