Post by straightlight » Sat Mar 09, 2013 5:42 am

By default with OpenCart, it already autocompletes by name and my second modification on this topic includes the model and SKU ...

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xlam » Sun Nov 10, 2013 6:52 pm

Works for me using oc 1.5.5.1

Baju Muslim Baju Pria Baju Anak Baju Korea Sparepart Printer Baju Muslim JNE Surabaya


New member

Posts

Joined
Sun Dec 25, 2011 2:58 pm

Post by straightlight » Sun Nov 10, 2013 10:25 pm

Thanks for the input. :)

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ManoLee » Mon Jul 20, 2015 3:20 am

Sorry for bumping such an old thread and I do know that this is for Opencart 1.5 version. I would kindly want to ask if there is such an example that works for Opencart 2.0 version. Can you please help?
Thank you very much!

Newbie

Posts

Joined
Thu Jun 18, 2015 11:43 pm

Post by straightlight » Mon Jul 20, 2015 4:12 am

ManoLee wrote:Sorry for bumping such an old thread and I do know that this is for Opencart 1.5 version. I would kindly want to ask if there is such an example that works for Opencart 2.0 version. Can you please help?
Thank you very much!
The only different step in v2.0+ releases is this paragraph in admin/view/template/catalog/product_form.tpl file after implying my first modification on the previous page of this topic excluding the template portion part:

Code: Select all

<div id="product-related" class="well well-sm" style="height: 150px; overflow: auto;">
                    <?php foreach ($product_relateds as $product_related) { ?>
                    <div id="product-related<?php echo $product_related['product_id']; ?>"><i class="fa fa-minus-circle"></i> <?php echo $product_related['name']; ?>
                      <input type="hidden" name="product_related[]" value="<?php echo $product_related['product_id']; ?>" />
                    </div>
                    <?php } ?>
                  </div>
This new portion is where you can make the modifications. Although, since my last modifications were most focused on PHP and jQuery, I would suggest to only modify the item['name'] line where it adds the item['model'] and item['sku'] after modifying the PHP steps rather than playing with the static HTML lines since it is not really required for this modification.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ManoLee » Mon Jul 20, 2015 6:33 pm

Thank you for your immediate input dear Straighlight.
Unfortunately, while trying to make this modification, my admin product page went blank. I must have messed something up.
Just to be sure that I did the right steps I summarize below:

In catalog/controller/product/product.php file,

I couldn't find:

Code: Select all

'reviews'    => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
So I found this:

Code: Select all

$data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);
and I added after:

Code: Select all

'model'       => $result['model'],

Then I went to admin/view/template/catalog/product_form.tpl
and in the portion where it is

Code: Select all

<div id="product-related<?php echo $product_related['product_id']; ?>"><i class="fa fa-minus-circle"></i> <?php echo $product_related['name']; ?>
I changed it to this:

Code: Select all

<div id="product-related<?php echo $product_related['product_id']; ?>"><i class="fa fa-minus-circle"></i> <?php echo $product_related['model']; ?>
I think the problem is in the catalog/controller/product/product.php file where the code is a bit different. Maybe this is the case?
Thank you very much!

Newbie

Posts

Joined
Thu Jun 18, 2015 11:43 pm

Post by straightlight » Fri Aug 07, 2015 9:14 pm

The modifications on the previous page is for the admin's end, not for the store front-end. Even on the v2.0x releases, there are no autocomplete methods for products under the product/product page.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 30 guests