- Posts: 128
- Thank you received: 0
Problems viewing the wishlist
- sergiobertini
-
Topic Author
- Offline
I have a serious problem with the wishlist.
I login to the site, add the products I want for my wishlist. OK!
I see the lists that I created and I can editálas. Recalling that in opição "Share", I mark "All". OK!
That is where the problem happens only having username and password registered on the site may display the wishlist. Who is not registered on the site, do not see the wishlist.
I need to make my wishlist public, so anyone can view them.
Can anyone help me?
Please Log in or Create an account to join the conversation.
Yes we corrected that bug already, thanks to edit the file "components/com_hikashop/views/cart/view.html.php" in the function "showcart()" add:
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
I performed this modification and even changed the following lines and it worked:
$filters = array('(a.user_id='.(int)$user->id.' OR a.session_id='.$database->Quote($user->session).') AND a.cart_type ='.$database->quote($cart_type));
}
By
$filters = array('a.cart_type ='.$database->quote($cart_type));
It worked, now my wishlist is visible to all registered users.
But two other serious problems occur:
1 Any registered user can delete all lists. This can never happen!
The registered user can delete only your list, you have to change it?
2 The wishilist is only visible to registered users. I need it to be Public (for non-registered user pose only view them).
Logical than to buy or book, they will be required to register.
It's possible you pass me the file and line of code I need to change to work this way?
Please Log in or Create an account to join the conversation.
Thanks to replace the content of your view "cart / showcarts" by:
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
Eu fiz a alteração em: cart/showcarts e deu o seguinte erro:
Parse error: syntax error, unexpected '?' in /home/wwwmadam/public_html/site/templates/template_site/html/com_hikashop/cart/showcarts.php on line 39
Please check what happened!
Please Log in or Create an account to join the conversation.
I just tried on my end and I have no errors.
Are you sure that you copy/paste the whole code ?
There is probably a missing tag or something like that.
If you are not able to solve this problem, thanks to give a backend access via PM with the url of that topic.
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
I need you to give me the full path to the file that you changed!
Another thing, when a registered user lit a wishilist, and click on the products you wish to purchase below shows "add to cart" button, but before also appeared "checkout", you're not showing more!
You can help me with this?
Please Log in or Create an account to join the conversation.
I just edited the view "cart / showcarts" via the menu Display > Views. So this file is in the template, here:
"templates/YOUR_TEMPLATE/html/com_hikashop/cart/showcarts.php"
I don't really understand your new request, thanks to give us more details.
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
Problem solved!
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
Well, I came up with another little problem in the view of my wish list.
From the beginning there were some issues that have been fixed!
I want when clicking the link wishilist, the lists appear!
Now, you are required to register to view the lists!
I want them to be viewed by all, without registering! After the netizen want adiquirir a product from the list, it will be required to register to be able to checkout!
Get it?
You can help me by showing me the file and I modify the code?
Please Log in or Create an account to join the conversation.
the view "cart / showcarts" via the menu Display > Views. So this file is in the template, here:
"templates/YOUR_TEMPLATE/html/com_hikashop/cart/showcarts.php"
It still in the same view that you need to do your modifications. Remove the if/else condition on the user login status in order to always display the list.
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
I understand!
I entered the Hikashop component, I clicked on the menu Display> Views.
After finding the file "templates / your_template / html / com_hikashop / cart / showcarts.php".
I sought the command line "if / else" the "condition on the user login status" but does not have this command line, this file!
Please can you be more specific?
CODE:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
I replaced the following code:
if(hikashop_loadUser() == null){
echo JText::_('PLEASE_LOGIN_FIRST');
}else{
by:
<?php } ?>
And it did not work, kept asking us to login.
Please Log in or Create an account to join the conversation.
I just tried on my end and removing that part, correctly display the wishlists interface. So you have maybe edited the view in the wrong template.
But, there is no wishlists displayed because, the current user don't have anyone, that's the way the system is working.
If you really want to display all the wishlists to anybody, so this is not a common way of using wishlists and this is not handle by HikaShop. So you will have to edit core file in order to have what you want.
To show all the wishlists to everybody even if he is not registered you have to edit the file "components/com_hikashop/views/cart/view.html.php", function "showcarts()". It require PHP knowledges.
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
But that line of code should I modify and what code should I insert this file?
Please Log in or Create an account to join the conversation.
In the view.html.php filen you have to remove the filters based on the user session id or the user id.
Replace:
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
Can you help me solve this problem?
Many thanks for the help already given
Please Log in or Create an account to join the conversation.
Efetuei the change of command in the file that you showed me, but it worked!
Can you help me solve this problem?
In what ? Can you give more details ?
Please Log in or Create an account to join the conversation.
- sergiobertini
-
Topic Author
- Offline
- Posts: 128
- Thank you received: 0
I meant "Does not work".
The system keeps asking to log in.
Please Log in or Create an account to join the conversation.