Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Layout & Blocks / Customer Block Missing *SOLVED*  (Read 8688 times)

Offline beazleybub

  • Newbie
  • *
  • Posts: 5
  • Karma: +2/-1
    • View Profile
Layout & Blocks / Customer Block Missing *SOLVED*
« on: March 20, 2016, 07:30:00 AM »
I deleted the customer block in the layout section of the admin and now I can't get it back. The AbanteCart demo has the same issue. How can I get it back? Thanks
« Last Edit: March 20, 2016, 05:08:14 PM by beazleybub »

Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
Re: Layout-Customer Block Missing
« Reply #1 on: March 20, 2016, 11:54:05 AM »
Guessing here, but you might be able to just add that block_id back to the block_layouts table and see if that works...


Offline beazleybub

  • Newbie
  • *
  • Posts: 5
  • Karma: +2/-1
    • View Profile
Re: Layout-Customer Block Missing
« Reply #2 on: March 20, 2016, 02:06:01 PM »
Seems like this is an issue that needs to be addressed. AbanteCart provided the block so users could easily login or create an account. If you delete the block and want to add it back later, you can't. This is obviously a bug. Not everyone has the experience to edit MySQL databases.

I noticed this issue also applies to the donate block. Why are these blocks available then unavailable after you delete them from the layout?

Thanks
« Last Edit: March 20, 2016, 02:17:46 PM by beazleybub »

Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
Re: Layout-Customer Block Missing
« Reply #3 on: March 20, 2016, 02:20:52 PM »
I don't disagree with you that you should be able to add that back and the developers have probably seen your note as well...(this is similar to me deleting my order statuses and having to add them back later (I don't think you can "disable" order statuses)...and it's strange you can't add the customer block back, but if you delete something instead of just just disabling it, just expect more problems down the line if something else depends on it.

That said, the benefits of Abantecart is the ability to change many things compared to many other tools so if someone isn't very familiar with PhpMyAdmin or basic web hosting admin tools, I'd honestly suggest considering other solutions because you will run into other issues (eg: changing file permissions, upgrades, etc...) where you really should know these things.

This is all my humble opinion of course and from looking/reading all the messages here, using this (and I think many other carts), requires some time to run and maintain.



In regards to turning stuff off and adding it back, did you try to just DISABLE a block instead?  That's the round circle icon.  I think this issue hasn't popped up before because if someone wanted to turn something off, they'd just disabled it and not outright delete it.

« Last Edit: March 20, 2016, 02:24:03 PM by webdevmerc »

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: Layout-Customer Block Missing
« Reply #4 on: March 20, 2016, 02:26:30 PM »
actually  I agree with beazleybub.   

We recently discovered the same issue is there in regards to BreadCrumbs block.  Even in 1.2.6.  If an admin deletes a breadcrumb (and seems customer) block rather than disable it,  there is no easy way to get the block to reappear.  We had to go to the coding to get it back. Beyond skill set of so many users -  I just hadn't gotten around to posting about it yet.

Hey AbanteCart Developers take a closer look at that Available Blocks in Adding Blocks to section on the Design/ Layouts process - 
thanks in advance for giving us an easier solution.

Lee

Offline beazleybub

  • Newbie
  • *
  • Posts: 5
  • Karma: +2/-1
    • View Profile
Re: Layout-Customer Block Missing
« Reply #5 on: March 20, 2016, 03:52:51 PM »
webdevmerc,

I respectfully disagree with your view. Wouldn't it be silly to build an automobile that couldn't be restarted once the engine was turned off? Wouldn't it be also silly to tell the consumer whom bought the automobile they needed to purchase a horse because they did not fully understand the design of that particular automobile?
« Last Edit: March 20, 2016, 06:07:30 PM by beazleybub »

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: Layout-Customer Block Missing
« Reply #6 on: March 20, 2016, 04:34:11 PM »
Hi again,

In our experience getting breadcrumbs back was more than adding it to the the database. I am not withholding here but think this truly is something the developers need to give a fix for.   Give it a bit and let's see what they come up with.

Lee

Offline beazleybub

  • Newbie
  • *
  • Posts: 5
  • Karma: +2/-1
    • View Profile
Re: Layout-Customer Block Missing
« Reply #7 on: March 20, 2016, 04:49:53 PM »
llegrand, Iv'e got the fix.  ;D

1. Log into your database and go to the "ab_block_templates" table.

2. Find the row entry you want to show up in the block list.
(In your case it's "blocks/breadcrumbs.tpl")

You'll notice in the column "parent_block_id" some of the values are set at zero. This column enables the blocks so you can choose them from the "Adding block to section" screen or the plus sign. The "parent_block_value" determines where the block will be made available.

3. Edit the row entry "blocks/breadcrumbs.tpl" and set the value of "parent_block_id" to "1".

4. Go to "System/Cache" in your carts admin section and clear the cache.

5. Go back to "Design/Layouts/" in your admin and either click on an empty block in the "header" section or the plus sign. You'll now be given the option to add the bredcrumbs to that section.

I don't know what all the available values are for the "parent_block_id" column, but do know when I set the row "blocks/breadcrumbs.tpl" to "1" it was available for the header section.

I'm going to assume the available values for the "parent_block_id" are 1 thru 8 because there are eight sections in the layout panel. You'll have to experiment to see if it works that way.

I did notice in the "ab_block_templates" table there were multiple rows that shared the same template name but had different "parent_block_id". I assume this was so a specific block could be used in multiple parts of the layout.

Hope this helps you.

The solution I posted is not any sort of hack. The way the layout and blocks currently work is to keep novices from placing blocks in places that they won't fit or would look bad.

However, AbanteCart failed to set the values for the blocks they placed in the default installation layout to a value that would allow them to be restored if they were to be deleted by a user from the admin. Not so much a bug but a mistake made by AbanteCart.

All they have to do to fix the issue is to change the values in the MySQL file in the installation directory.
« Last Edit: March 20, 2016, 05:34:09 PM by beazleybub »

Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
Re: Layout-Customer Block Missing
« Reply #8 on: March 20, 2016, 07:01:55 PM »
llegrand, Iv'e got the fix.  ;D

1. Log into your database and go to the "ab_block_templates" table.

2. Find the row entry you want to show up in the block list.
(In your case it's "blocks/breadcrumbs.tpl")

You'll notice in the column "parent_block_id" some of the values are set at zero. This column enables the blocks so you can choose them from the "Adding block to section" screen or the plus sign. The "parent_block_value" determines where the block will be made available.

3. Edit the row entry "blocks/breadcrumbs.tpl" and set the value of "parent_block_id" to "1".

4. Go to "System/Cache" in your carts admin section and clear the cache.

5. Go back to "Design/Layouts/" in your admin and either click on an empty block in the "header" section or the plus sign. You'll now be given the option to add the bredcrumbs to that section.

I don't know what all the available values are for the "parent_block_id" column, but do know when I set the row "blocks/breadcrumbs.tpl" to "1" it was available for the header section.

I'm going to assume the available values for the "parent_block_id" are 1 thru 8 because there are eight sections in the layout panel. You'll have to experiment to see if it works that way.

I did notice in the "ab_block_templates" table there were multiple rows that shared the same template name but had different "parent_block_id". I assume this was so a specific block could be used in multiple parts of the layout.

Hope this helps you.

The solution I posted is not any sort of hack. The way the layout and blocks currently work is to keep novices from placing blocks in places that they won't fit or would look bad.

However, AbanteCart failed to set the values for the blocks they placed in the default installation layout to a value that would allow them to be restored if they were to be deleted by a user from the admin. Not so much a bug but a mistake made by AbanteCart.

All they have to do to fix the issue is to change the values in the MySQL file in the installation directory.


Apparently, you do have the knowledge to go back in and research/post a fix for an issue you ran into.  That's great!


If you look at my first line:
ME: "I don't disagree with you that you should be able to add that back and the developers have probably seen your note as well"


I actually AGREED with you that you should be able to add it back so I don't know what you are actually disagreeing with me on respectfully, but again, I do stand by my other point (maybe this is what you disagreed with) that if you don't know a thing about what you are doing at all with any program/tech, Abantecart, you name it, you will run into trouble and problems if you delete things randomly even if the program lets you do so.  (if you can't drive and don't know how to start a car, maybe don't turn off the engine?). :)

I deleted some shipping statuses since I didn't need them, I added them back, no biggie...If you can't add it back or fix it, don't delete stuff in general if you have the option to disable it from the interface...That's all...


(Are we just two grumpy guys who just like to argue here?...I'll shutup now btw.)

« Last Edit: March 20, 2016, 07:03:50 PM by webdevmerc »

Offline beazleybub

  • Newbie
  • *
  • Posts: 5
  • Karma: +2/-1
    • View Profile
Re: Layout & Blocks / Customer Block Missing *SOLVED*
« Reply #9 on: March 20, 2016, 10:13:56 PM »
Grumpy really?

What I disagree with you about is the fact you completely assumed I was incompetent and suggested I not use the software. Your statements have bordered trolling and are not appreciated. If everyone knew everything there is to know about AbanteCart this forum would not exist.

If you don't have anything constructive to add to a conversation then maybe you shouldn't contribute at all. I'd rather spend my energy finding solutions, not trolling forums.

I certainly won't spend any more energy on replies to you. So go ahead, have the last word. I've made my point.

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Layout-Customer Block Missing
« Reply #10 on: March 20, 2016, 10:58:46 PM »

However, AbanteCart failed to set the values for the blocks they placed in the default installation layout to a value that would allow them to be restored if they were to be deleted by a user from the admin. Not so much a bug but a mistake made by AbanteCart.

All they have to do to fix the issue is to change the values in the MySQL file in the installation directory.

beazleybub, can you please clarify what values your refer to? Did you check install/abantecart_database.sql and install/abantecart_sample_data.sql?
This files contain code data for installation and sample data.

I can see the issue with missing breadcrumb after removing. Need to investigate. Stay tuned.

“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5798
  • Karma: +274/-2
    • View Profile
Re: Layout & Blocks / Customer Block Missing *SOLVED*
« Reply #11 on: March 21, 2016, 01:07:13 AM »
Hello.

Issue reported to the bug tracker https://github.com/abantecart/abantecart-src/issues/495
thanks everyone for reporting problems

We will update this bug and this topic once developers fix it.
« Last Edit: March 21, 2016, 01:09:57 AM by Basara »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Layout & Blocks / Customer Block Missing *SOLVED*
« Reply #12 on: March 21, 2016, 12:41:43 PM »
I deleted the customer block in the layout section of the admin and now I can't get it back. The AbanteCart demo has the same issue. How can I get it back? Thanks

Solution:
just run sql query
Code: [Select]
INSERT INTO `ac_block_templates` (`block_id`, `parent_block_id`, `template`, `date_added`) VALUES
(29, 3, 'blocks/account.tpl', now() ),
(29, 6, 'blocks/account.tpl', now() );

where ac_ - your table prefix!

Then clear cache and try to add block into layout.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod