AbanteCart Community
Shopping Cart Operations => Support => Topic started by: beazleybub 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
-
Guessing here, but you might be able to just add that block_id back to the block_layouts table and see if that works...
-
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
-
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.
-
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
-
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?
-
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
-
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.
-
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.)
-
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.
-
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.
-
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.
-
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
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.