lost 0 points error

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 9 months ago #243789

Hi,

The text indicate that the customer can use X points to have a Y discount.
I don't see what the issue with that text ; which is just a question to the customer in order to know if he wants to use his points to get a discount... So even if he does not want to use his points, he still have the information that he can change his mind and use his X points to get a Y discount...

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: 27
  • Thank you received: 0
7 years 9 months ago #243827

Hi:
Shopping habits and different ideas
How do I change 0
Please provide code
thank you!

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 9 months ago #243928

Hi,

It doesn't sound logical to change that... But anyway, you can change the code:

$consume['points']
to:
($use_coupon?$consume['points']:0)
in plugins/hikashop/userpoints/userpoints_checkout.php for that change.
But we won't include that change on our end.

Last edit: 7 years 9 months ago by Jerome. Reason: typo fix

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

  • Posts: 27
  • Thank you received: 0
7 years 9 months ago #243944

Hi:
Thank you !
($use_coupon?:$consume:0)
Blank screen

($use_coupon?:$consume=0)

Test results
1. Please provide the correct code
select Yes 1 error (700 correct)

You have 6425 points.
You can use 1 points to have a discount of 700,00 TWD.
Do you want to use these points ?
Yes

2.
select No 0 correct

You have 6425 points.
You can use 0 points to have a discount of 700,00 TWD.
Do you want to use these points ?
No

You can earn 1000 points with this order

Thank you !

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 9 months ago #243947

I fixed a typo in the Nicolas' message


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: 27
  • Thank you received: 0
7 years 9 months ago #243954

Hi:
select Yes 1 error (700 correct)
Please 1 how to change the amount of deduction
1 = 700 correct

You have 6425 points.
You can use 1 points to have a discount of 700,00 TWD.
Do you want to use these points ?
Yes

Please provide the correct code
Thank you !

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 9 months ago #243989

Hi,

The modification that I provided (and that was corrected by Jerome) cannot give a result of "1 points" on the view of the checkout.
So I can only think that the modification we gave wasn't applied properly. Please double check it.

Please note that this is a user support forum. We provide answers to user questions. We're not here to customize your website for you. We were nice enough to provide help and some hints as to what to do, and even gave some code samples.

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

  • Posts: 27
  • Thank you received: 0
7 years 9 months ago #244011

Hi:
Understanding!
Because it was right before it was revised
Correct but turned into error =1 $use_coupon?:$consume=0
Do not modify = 700 $consume
This part I didn't estimate
Please
see test
reality is equal to 1

123.mart168.com/index.php/hikashop-menu-for-products-listing
login user:test
pw:12345678

If you need a number can also invoke custom
that would with a numeric charges to how much?

Thank you very much!

plugins\hikashop\userpoints\userpoints.php 880
Do you have equal to 1 reason

$use_coupon = 1 - (int)$app->getUserState(HIKASHOP_COMPONENT.'.userpoints_no_virtual_coupon', (int)(@$this->plugin_options['checkout_step'] && @$this->plugin_options['default_no_use']));

plugins\hikashop\userpoints\userpoints_checkout.php
<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.6.3
 * @author	hikashop.com
 * @copyright	(C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><div id="hikashop_userpoints_status">
	<fieldset>
		<legend><?php echo JText::_('POINTS'); ?></legend>
		<span class="hikashop_userpoints_status_value"><?php
			if($points > 0) {
				echo JText::sprintf('USERPOINTS_HAVE_X_POINTS', $points);
			} else {
				echo JText::_('USERPOINTS_NO_POINTS');
			}
		?></span>
<?php
	if(!empty($consume)) {
?>
			[color=#bb0000]<br/><span class="hikashop_userpoints_status_user"><?php echo JText::sprintf('USERPOINTS_USER_FOR_DISCOUNT', $use_coupon?:$consume['points']=0, $discount); ?></span>[/color]

<!--                                                        ($use_coupon?:$consume['points']:0)
<?php echo JText::sprintf('USERPOINTS_USER_FOR_DISCOUNT', $consume['points'], $discount); ?></span>
-->
<?php if(!empty($this->plugin_options['ask_no_coupon'])) { ?>
			<br/><span class="hikashop_userpoints_status_question"><span><?php echo JText::_('USERPOINTS_USE_DISCOUNT_QUESTION');?></span> <?php
				echo JHTML::_('hikaselect.booleanlist', 'userpoints_use_coupon', 'onchange="this.form.submit();"', $use_coupon);
			?></span>
<?php }
	}
	if($earn_points !== false && !empty($earn_points)) {
?>		<br/><span class="hikashop_userpoints_earn"><?php echo JText::sprintf('USERPOINTS_EARN_POINTS', $earn_points); ?></span>
<?php
	}
?>
	</fieldset>
</div>

Last edit: 7 years 9 months ago by nicolas. Reason: formatting code

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 9 months ago #244015

Hi,

You're using the code:

$use_coupon?:$consume['points']=0
instead of the code:
($use_coupon?$consume['points']:0)
like we provided. Please use the correct code and it should work.

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

  • Posts: 27
  • Thank you received: 0
7 years 9 months ago #244038

Hi:
Thank you very much!

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

  • Posts: 27
  • Thank you received: 0
7 years 9 months ago #244204

Hi:
Can not find a place to modify the order
please
See additional pictures



I want to be out
joomla yes in the first no back
but here are in turn
i found for more code modifications are not successful

Yes change in the top
General habits yes is in front

I'm sorry for the national and regional shopping habits.
Ask you these questions

administrator\components\com_hikashop\helpers\joomla30.php
public static function booleanlist($name, $attribs = null, $selected = null, $yes = 'JYES', $no = 'JNO', $id = false){
$arr = array(
JHtml::_('select.option', '1', JText::_($yes)),
JHtml::_('select.option', '0', JText::_($no))
);

thank you!

Attachments:
Last edit: 7 years 9 months ago by hlv008.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 9 months ago #244206

Hi,

As you found out, the order of the yes/no comes from the file administrator\components\com_hikashop\helpers\joomla30.php
So you'll have to reverse the two lines:
JHtml::_('select.option', '1', JText::_($yes)),
JHtml::_('select.option', '0', JText::_($no))

like that:
JHtml::_('select.option', '0', JText::_($no)),
JHtml::_('select.option', '1', JText::_($yes))

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

  • Posts: 27
  • Thank you received: 0
7 years 9 months ago #244256

Hi:
This file is not
administrator\components\com_hikashop\helpers\joomla30.php
Can not find a place to modify

Can prompt on the ?

Thank you!

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 9 months ago #244304

Hi,

Please edit directly the "user points" plugin for the "checkout" file ; 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: 27
  • Thank you received: 0
7 years 9 months ago #244394

Hi:
plugins\hikashop\userpoints\userpoints_checkout.php

I notice that this
is not fall back here?
echo JHTML::_('hikaselect.booleanlist', 'userpoints_use_coupon', 'onchange="this.form.submit();"', $use_coupon);

Search all of the
Could not find

<?php
/**
* @package HikaShop for Joomla!
* @version 2.6.3
* @author hikashop.com
* @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><div id="hikashop_userpoints_status">
<fieldset>
<legend><?php echo JText::_('POINTS'); ?></legend>
<span class="hikashop_userpoints_status_value"><?php
if($points > 0) {
echo JText::sprintf('USERPOINTS_HAVE_X_POINTS', $points);
} else {
echo JText::_('USERPOINTS_NO_POINTS');
}
?></span>
<?php
if(!empty($consume)) {
?>
<br/><span class="hikashop_userpoints_status_user"><?php echo JText::sprintf('USERPOINTS_USER_FOR_DISCOUNT', $use_coupon?$consume:0, $discount); ?></span>

<?php if(!empty($this->plugin_options)) { ?>
<br/><span class="hikashop_userpoints_status_question"><span><?php echo JText::_('USERPOINTS_USE_DISCOUNT_QUESTION');?></span> <?php
echo JHTML::_('hikaselect.booleanlist', 'userpoints_use_coupon', 'onchange="this.form.submit();"', $use_coupon);
?></span>
<?php }
}
if($earn_points !== false && !empty($earn_points)) {
?> <br/><span class="hikashop_userpoints_earn"><?php echo JText::sprintf('USERPOINTS_EARN_POINTS', $earn_points); ?></span>
<?php
}
?>
</fieldset>
</div>

Thank you!

Last edit: 7 years 9 months ago by hlv008.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 9 months ago #244462

Hi,

You can create an override :
templates/YOUR_TEMPLATE_NAME/plg_hikashop_userpoints/checkout.php
And I don't understand your fallback question. You can to change how the "yes/no" is generated and that is provided by the HikaShop core (or the Joomla core), so if the result is not what you're expecting, the best is to do the HTML yourself in the view.

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.

Time to create page: 0.100 seconds
Powered by Kunena Forum