AbanteCart Community
Shopping Cart Operations => Tips and Tricks => Topic started by: DavidLIR on November 18, 2013, 03:00:22 PM
-
I have set up sub-categories under the main categories so that the drop down menu will show the other items. However the intermediate page is not needed an takes the customer one more click to get to the product page...
I would like to be able to forward the sub-category to the product page directly...
Example.....main category is T-Shirts....sub-categories are Men's tees, Ladies Tees, Youth Tees, Toddler Tees, etc. So I made up a child category for each one under T-Shirts...then each child category has a product link to add to cart (this part I feel is confusing to a potential customer because it says add to cart...but it doesnt add to cart it just sends them to the product page where they can then add the item to cart......I have set up options that have to be chosen in order to go to cart...
Is there an easy way to do this? I tried going through the webhosting cpanel and forwarding the one page to the other but it will not work this way...says it is an impossible direction that cannot be completed.
Thanks
David
-
Can you help understanding your question with screenshots or links?
-
Thank you for your response. the best way would be to view my site that I am building...loveisreal-believe.com/store you will see the categories that we are developing just under the slider banner. If you mouse over the categories (go to the T-Shirts tab) the drop down menu shows the child categories that I have set up (5 categories drop down) ...click on a child category (Ladies T-Shirts) You will see the picture with an add to cart button - page code(........./store/index.php?rt=product/category&path=67_65) Now click on the child category and you go to the product page (.............../store/index.php?rt=product/product&path=67_65&product_id=112)
This is what I would like to do....I would like to be able to forward the child category (........./store/index.php?rt=product/category&path=67_65) direct to the product page (.............../store/index.php?rt=product/product&path=67_65&product_id=112)
You can see how this would streamline the website, because the customer could 1) see the options in the drop down menu at the top of the page....and 2)go direct to the product page - by clicking on the child category - where they have to make the choices for size, color, design choice and amount....Also they would only encounter the add to cart button once.......it is confusing to get the add to cart button in the child category where they cannot make the choices....and it does not actually add to cart by clicking that button...it only sends them on to the product page....
I hope this is clear enough...please let me know if there is more I can describe to make it more clear
Thank you again for all your expert help...it is very much appreciated.
David :)
-
I understand what you are trying to do. Basically you want the dropdown link for Unisex/Men's T Shirts to go directly to the men's t-shirt product instead of the category page. So forth and so on for each corresponding T Shirt category. Correct?
If so, do you want this to apply to every product in your store? Or just the T Shirts?
I know how I would do it if it were my store, unfortunately I don't think its how others would do it. I'm not sure mine would be the most effective way. My way would involve modifying the category page to strip it of the title & list of products. Then I would just go into the admin side and edit the specific category and call in the product via an iFrame.
...archmetalsfl.com/index.php?rt=product/category&path=77_78
This is the page I am working on currently. If you go to any of the Porfolio categories those are all called in via an iFrame. Don't worry about the load time, it is due to my gallery crawling a folder for images and building the gallery so that if I want to add new photos I never have to modify code, I just upload into that specific folder and the gallery will automatically grab it.
-
Thank you JH... for the post..I looked at your ramps page - nice pictures...
Yes you have it right...but it sounds a bit out of my league...I'm just a beginner with code....
Keep up the good work, your site looks like it will be very nice. I would need a lot of coaching in order to do what you are suggesting..
David
-
If abantecart gives the nod to this being an efficient solution I would be glad to do the code for you (shouldn't take more than 15-30 mins). It seems one risk to changing code is when updating the cart to the newest release it may replace some of the files we modify. Easiest solution is to always back up the files that you are changing (both original & modified).
I am still learning the structure of this cart so abantecart may have an easier/much less intrusive solution.
-
JH, Thank you for the offer. I would appreciate any Help...Let's see if any easier solutions come up.
David
-
If abantecart gives the nod to this being an efficient solution I would be glad to do the code for you (shouldn't take more than 15-30 mins). It seems one risk to changing code is when updating the cart to the newest release it may replace some of the files we modify. Easiest solution is to always back up the files that you are changing (both original & modified).
To avoid issues with upgrade
1. You can post us your solution and we can include it in the release. (You can use github for this)
2. You can create a simple extension with replace or hook to controller/template
-
I like the idea of a 'simple extension with replace or hook to controller/template'...
If JHammond53 or others would be interested in making that extension that would be great...A little beyond me yet.
I would appreciate an update if this comes available...
Thanks,
David
-
Is there a ready solution for this, me too I need?
-
Not yet, no ready solution...but it's being worked on.
-
To avoid issues with upgrade
1. You can post us your solution and we can include it in the release. (You can use github for this)
2. You can create a simple extension with replace or hook to controller/template
I too am trying to avoid any custom php work, although I've done a little. When we upgrade to 1.1.8 all your files will be replaced and you'll lose all that custom work.
-
Problem with updates of customized code has existed since web applications came to existence. :)
I am sure we can find solution one day, but for now the way to customize and be safe, is to create an extension.
I had an idea of automatic code comparison on update with easy to read report. This will require some work and we will see if we can get it done one day.
-
Thanks and I totally understand why. You'd have to import the custom code into the installer, then re-install it. After all, it is source code one is changing. When you install the new source code, it overwrites the old files, and thus the customization is lost.
Keep up the good work, this cart is awesome!
-
Hi,
Glad to hear you are all working on this...Again keep up the good work. I'll be waiting to hear of solutions.
-
Just a little update to show you what I have done to work with this...I found that the controller for the blocks/category seems to be taking from both the Menu items and the category items. Check out loveisreal-believe.com Just above the slider banner I used that block and if you mouse over the home tab you will see that it works just as I wanted it to work...each link goes directly to the product page...however if you chose any of the three other tabs Apparel, Totes & Bags, Misc those will go to a category page...For those who understand code, which I don't, it seems like some of the code is there to do it...but it seems to be pulling from two different areas?
I will tell you how I did it. I created the drop downs under the home tab under design/menu. and I added the external link for the product page for the direct link to each product page... for that dropdown tab...
example for the menu item Products/T-shirts/Ladies T-Shirts I put the external link http://loveisreal-believe.com/store/t-shirts/ladies-t-shirt
I would appreciate some feedback on this...Thanks,
-
This is the solution from another system, but the code is almost identical.
Code:
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
Replace with this:
$this->data['continue'] = $this->url->link('common/home');
if (!isset($this->request->get['route']) || (isset($this->request->get['route']) && (isset($this->request->get['path']) && $this->request->get['path']==='61_73' ))){
$this->redirect($this->url->link('product/product&path=61_73&product_id=58', '', 'SSL'));
}else if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
} else {
$this->template = 'default/template/product/category.tpl';
}
This is the code in public_html\core\lib\template.php - Line 33:
if (file_exists(DIR_TEMPLATE . $this->config->get('config_storefront_template') . '/template/'. $filename)) {
$filename = $this->config->get('config_storefront_template') . '/template/'. $filename;
} else {
$filename = 'default/template/'. $filename;
}
Can anyone help with the decision, according to the example?