Jump to content
Nommam

Bloc My Account ( Custom )

Recommended Posts

I suggest:
Because there is already a module called blockmyaccount, you should rename your module, it's very easy. Example: blockmyaccountcustom.


Suggestion: comme ce module est different du module original, tu pourrais lui donner un nom different, c'est tres facile à faire et cela permet de faire des tests sans avoir a écraser ou renommer l'original et cela evite les confusion de fichiers. ;-)
blockmyaccountcustom par exemple

Share this post


Link to post
Share on other sites

Ou mettre le fichier tpl dans theme/mon theme/modules/blockmyaccount/blockmyaccount.tpl ;)

Share this post


Link to post
Share on other sites
Bonjour à tous,


Pour ceux chez qui ca ne fonctionne pas (ex: un clique sur déconnexion ne bascule pas):
If this module don't work. Its one of the solution

Fonctionne avec la ver 1.2.4.0 / Works with ver 1.2.4.0

Replace BLOCKMYACCOUNT.TPL by this one:


your code missed the "No account yet?" and needed organizing for positioning & fixed the no-change of the block title when changing the language..
Here is it modified:
<!-- Block My Account -->
 {if $logged}

{l s='My Account' mod='blockmyaccount'}


{l s='My orders' mod='blockmyaccount'}
           {if $returnAllowed}
{l s='Merchandise return' mod='blockmyaccount'}
           {/if}
{l s='Credit slips' mod='blockmyaccount'}
{l s='My addresses' mod='blockmyaccount'}
{l s='My personal info' mod='blockmyaccount'}
           {if $voucherAllowed}
{l s='My vouchers' mod='blockmyaccount'}
           {/if}
           {$HOOK_CUSTOMER_ACCOUNT}



{l s='Sign out' mod='blockmyaccount'}




 {else}

   {if $displayconnexionbox}


{l s='My Account' mod='blockmyaccount'}


           <form action="authentication.php" method="post">

                      {l s='E-mail address' mod='blockmyaccount'}

                      <input type="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|escape:'htmlall'|stripslashes}{/if}"/><br />
                      {l s='Password' mod='blockmyaccount'}

                      <input type="password" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|escape:'htmlall'|stripslashes}{/if}"/><br />

                      <input type="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />
<input type="submit" id="SubmitLogin" name="SubmitLogin" value="{l s='Log in' mod='blockmyaccount'}" class="button" /></div>

              </form>
              {if $displaypassword}

{l s='Forgot your password?' mod='blockmyaccount'}

           {/if}
           {if $displayregister}

{l s='No account yet?' mod='blockmyaccount'}

           {/if}




   {/if}
 {/if}
<!-- /Block My Account --> 

Share this post


Link to post
Share on other sites

Very great Nommam, I think presta team should consider this as a part of the next release..

Share this post


Link to post
Share on other sites

Thanks guys. This got me going in the right direction. I don't know how to make a module yet (i'm too lazy to learn right now... actually not enough time!) so what I did was change the current module "blockuserinfo" included in prestashop. I didn't want a block in the nav area anyway - I wanted it right at the top of the page:

www.seriesperformance.com

here's the code in /opt/prestashop/modules/blockuserinfo/blockuserinfo.tpl

<!-- Block user information module HEADER -->

   {if $logged}

{$customerName} ({l s='Log out' mod='blockuserinfo'})


{l s='Cart:' mod='blockuserinfo'}
{if $cart_qties > 0}{$cart_qties}{/if}{l s='product' mod='blockuserinfo'}{l s='products' mod='blockuserinfo'}
{if $cart_qties > 0}{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, 4)}{else}{convertPrice price=$cart->getOrderTotal(true, 4)}{/if}{/if}
{l s='(empty)' mod='blockuserinfo'}

{l s='Your Account' mod='blockuserinfo'}


   {else}

     <form action="{$base_dir_ssl}authentication.php" method="post">
{l s='Login:' mod='blockmyaccount'}
       <input type="text" id="email" name="email" value="Email Address{if isset($smarty.post.email)}{$smarty.post.email|escape:'htmlall'|stripslashes}{/if}">

{l s='Password:' mod='blockmyaccount'}
       <input type="password" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|escape:'htmlall'|stripslashes}{/if}" style="width:79px;"/>
       <input type="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />
       <input type="submit" id="SubmitLogin" name="SubmitLogin" value="{l s='Go' mod='blockmyaccount'}" />



{l s='Register' mod='blockuserinfo'}  |  
{l s='Forgot password?'}
     </form>

   {/if}



<!-- /Block user information module HEADER -->




That is all I had to change!

Any updates could end up wiping this out, though... be sure to save a copy!

Share this post


Link to post
Share on other sites

Well, I'm pretty much gobsmacked by this: Presta does NOT have a login module so that customers can login without having to add items to their cart????
I hadn't realised this until a friend ( who I made a shop for), asked me if I could put a login module on the home page. So off I went, searching these forums.
I found a couple of threads ( including this one), and tried all the offered solutions. I DID get one login module to work, but ONLY on Presta 1.2.4
I'm still trying to understand why a shopping cart would NOT have a login module built in.
I've sung Presta's praises to all and sundry since I first started using it for my site a few years ago. It has its ( at times) annoying, illogical quirks, but I've stayed with it. I've spent literally hundreds of hours on this forum, searching for answers...some found, some not.
Now though, I'm unsure what to do. To date, the positives have outweighed the negatives ( mostly), and the bottom line is, I KNOW Prestashop, and to change shopping carts would mean another long painful learning curve.
I'm not sure why I never noticed this lack of login module on my main site that has used Presta for years, so maybe that's why it's NOT a core module, but it does bring home yet another annoying quirk.
I hope someone can prove me wrong, that there IS a login module that works on 1.2.5....searching on this forum is a huge PITA, so I could have missed finding the appropriate thread/post.

Share this post


Link to post
Share on other sites

w jakiej wersji jest kompatybilny?

Mam 1,1 jej nie kompatybilne tak? ; <

i gdzie mogę znaleźć starej wersji - link w pierwszej stronie jej nie dobre

Share this post


Link to post
Share on other sites

Something odd here...

I have everything regarding this mod working fine except when I log in I can see all added modules in the center screen but in the "my account box", I don't see the same amount of listed modules. All I see are the .php links only

Please see attached image for better explanation.

Regards

18203_ciBItWHJ9xSTVn0CzOcr_t

Share this post


Link to post
Share on other sites

I can confirm this problem. The install function of this module does not create the "My account" hook like the original module does. If you haven't previously installed the original my account module, this hook will be missing. You should add the following to the bottom of blockmyaccount.php:

private function addMyAccountBlockHook()
{
   return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)');
}

private function removeMyAccountBlockHook()
{
   return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlock\'');
}



and then change the first line of the install() function to:

if (!$this->addMyAccountBlockHook() OR !parent::install() OR !$this->registerHook('leftColumn'))



Then uninstall, then install the module again so that the "My account" hook is added to the database.

Share this post


Link to post
Share on other sites

Thanks for the code Rocky.

Ye, I also found it was because of hooks. Issues was this was on a store that was installed with no modules. My solution was to re-install the account module that comes with PS1.2.5 and then just overwrite with the new module. It worked fine then.

What I will now do is add your code updates to the package for future installs.

Regards,

Share this post


Link to post
Share on other sites

Hi, I just downloaded the zip for this module.

But I can't already see that module on the website.. why?

Share this post


Link to post
Share on other sites

No, I can't see it..

I just want to build a private website with a login form on the index and a "not memeber yet" form.

So I have trieded this module. But it doesn't work.

Can you help me?

Thanks

Share this post


Link to post
Share on other sites

This module is great, but is it possible that the color to be the default color for blocks?

Share this post


Link to post
Share on other sites

if change in tpl the same name what have deafult tpl with block, then u have the same color :)

change tpl

Share this post


Link to post
Share on other sites

More details?
I've searched in the tpl file but i didn't find a thing regarding background

Later edit:
I managed a little bit to edit the module but is not enough
I edited global.css at block_myaccount but isn't displaiyng right.
any help?
the url:
http://flori.orhion.ro

Share this post


Link to post
Share on other sites

Where can I download this module? I can't found
1.5 version? where?

thanks a lot

Share this post


Link to post
Share on other sites
Where can I download this module? I can't found
1.5 version? where?

thanks a lot


+1

Share this post


Link to post
Share on other sites

My exiprens with these kind of box is that they tend to spooke off costumers that has no account. Im guessing that they are thinking "ohh i need an account to shop here, how do i get one, can i even get one, hmmm... im out of here" :)

Share this post


Link to post
Share on other sites

Great stuff, thanks alot :) and @Timpet, i think just about everyone who considers buying something online is accustomed to a login form ;) the few customers you might loose is worth it, compared to the gain you get through letting returning customers and visitors log in more efficiently. actually i think it could be a very positive way of subliminaly leading visitors to getting an account, especially if you have some kind of carrot. like refferer-bonuses and that kind of thingy goin :)

Share this post


Link to post
Share on other sites

This module works on version 1.3.1.1 and with URL rewriting ON, you need to change some lines in the blockmyaccount.tpl. Put a "../" on the end of each .php file which is being called ... such like below. if not .. your customers won't be able to login or click any of the links if they are on a different page other than your HOME page. e.g. if you are in www.yoursite.com/content/terms-and-conditions the links on the my account block would be www.yoursite.com/content/password.php

<form action="../authentication.php" method="post">



 {if $displaypassword}

{l s='Forgot your password?' mod='blockmyaccount'}

              {/if}
              {if $displayregister}

{l s='No account yet?' mod='blockmyaccount'}

              {/if}

Share this post


Link to post
Share on other sites

i think is better

<form action="{$base_dir}authentication.php" method="post">

Share this post


Link to post
Share on other sites

emmeics,

I am not a programmer ... i got "../" from some thread ... so I applied it here as well ... can you please tell me what is the difference between the two solutions?

Share this post


Link to post
Share on other sites
This module works on version 1.3.1.1 and with URL rewriting ON, you need to change some lines in the blockmyaccount.tpl. Put a "../" on the end of each .php file which is being called ... such like below. if not .. your customers won't be able to login or click any of the links if they are on a different page other than your HOME page. e.g. if you are in www.yoursite.com/content/terms-and-conditions the links on the my account block would be www.yoursite.com/content/password.php

<form action="../authentication.php" method="post">



 {if $displaypassword}

{l s='Forgot your password?' mod='blockmyaccount'}

              {/if}
              {if $displayregister}

{l s='No account yet?' mod='blockmyaccount'}

              {/if}



Bonjour
Merci fonctionne très bien de cette manière.

Share this post


Link to post
Share on other sites

Hi

I'm new to prestashop and I'm trying to install this module, but I don't know how to get it to show on my website?
Where do I upload the tpl file?

Thanks.

Share this post


Link to post
Share on other sites

Hi, I have sent you donation 14 days ago and still waiting for module, where is problem? Thanx

Share this post


Link to post
Share on other sites

i have send it at Jeu 17 juin 2010, 11h 04min 10 AM

Share this post


Link to post
Share on other sites

My fault, it was in my SPAM folder. Thank you very much for module.

i have send it at Jeu 17 juin 2010, 11h 04min 10 AM

Share this post


Link to post
Share on other sites

Hi there,

I put in the

<form action=”{$base_dir}authentication.php” method=“post”>

but I still get the "We're sorry, but the Web address you entered is no longer available " error.

This happens when I am not logged in but I am viewing a product or viewing a CMS page and then either click the "login", "Forgot your password?" or "Create an Account" links...

Any help would be mega appreciated as this is a brilliant module!

Share this post


Link to post
Share on other sites

Erm... odd! It is working now... Can't be a cache thing can it? Supposed to be immidiate after .tpl upload?
Anyways, adding the {$base_dir} worked for me too!

Much thanks!

Share this post


Link to post
Share on other sites

Nevermind. Found the problem myself.

It looks like PrestaShop isn't compatible with Google Chrome, that's why it didn't work! Although you can see the website, yet you can't login with the browser.

Make it possible and then you got another customer here!

Share this post


Link to post
Share on other sites

How exactly does one install this, I uploaded it but it does not appear to do anything.

Share this post


Link to post
Share on other sites

Unzip the archive on your PC, and with FTP put it n the modules repertory, after go in your BO and Install & configure it

Share this post


Link to post
Share on other sites

Dear Friend,

It will work with 1.3.2.1? What about Language? Is this support English?

Regards
Vilas

Share this post


Link to post
Share on other sites

Vilas - it works fine with 1.3.3, so I'd be very surprised if it didn't work with 1.3.2.1.

And it comes with English translation.

Share this post


Link to post
Share on other sites

In case anyone wants to know, yes it does work with 1.4

Share this post


Link to post
Share on other sites

module crashs my shop

internal error 505 after installation

my ps version
PrestaShop™ 1.4.3

edit:

just tested again
when I enable

Display the connexion box if logout

then it crashs!

and the login box is missing :(

Share this post


Link to post
Share on other sites

not possible to run it...
maybe anyone can help?

www.goldcave.net
possible it doesnt work because the main page doesnt have a right coloumn?

Share this post


Link to post
Share on other sites

How much is a small donation or how much is a large donation ?

small 1€ or 10€ ?

Share this post


Link to post
Share on other sites

Hi, I was using this excellent module since version 1.3 of prestashop.

Since I updated my shop from 1.4.9 to 1.5.6 it doesn't work anymore.

When I click on connect after having put in my email and password it says that the requested page doesn't exist.

I'm ready to donate 10€ to whoever helps me on finding a solution.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More