Page 15 of 16

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Thu Sep 15, 2011 4:35 pm
by antonaq
Hi @ all,
this is my first post, but i want contribute to opencart community.

I believe there's a minor bug in google_sitemap.php for google sitemap generation.

In brief, the bug is in code that generates the manufacturers pages.

Sitemap now links to:
../index.php?route=product/manufacturer&manufacturer_id=83
but the correct is
../index.php?route=product/manufacturer/product&manufacturer_id=83

The code to modify is

Code: Select all

$output .= '<loc>' . str_replace('&', '&', $this->url->link('product/manufacturer', 'manufacturer_id=' . $manufacturer['manufacturer_id'])) . '</loc>';
The bugfix maybe:

Code: Select all

$output .= '<loc>' . str_replace('&', '&', $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $manufacturer['manufacturer_id'])) . '</loc>';
Please verify.

To be fast, I attached patch file generated by tortoise svn on my local opencart.

Best regards

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Thu Sep 15, 2011 9:21 pm
by uksitebuilder
I believe this has been fixed in the SVN for the next update too.

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Thu Sep 15, 2011 9:56 pm
by antonaq
uksitebuilder wrote:I believe this has been fixed in the SVN for the next update too.
I confirm that the bugfix was fixed: http://opencart.googlecode.com/svn/trun ... itemap.php

Sorry for my late bug report.

Checkout T&C Not Appearing on Second Store Checkout

Posted: Mon Sep 19, 2011 2:31 pm
by novusweb
We have finally set up OpenCart 1.5.1 to work with multiple stores in a shared SSL environment.

What we've noticed, however, is that for the second of two stores, even with Checkout Terms selected as required, no confirmation checkbox or link for the T&C lightbox appears on the Checkout.

1.5.1: Undefined Index:Can't Modify Header Info.-pls help.

Posted: Mon Sep 19, 2011 4:19 pm
by okmarket
Hi

I get this warning sometimes, after i change color of product or dele one color of product options, and then save it, so I get below warning,so who can help me fix this problem? thank you.

Code: Select all

Notice: Undefined index: option_value_id in /home/okmarket/public_html/admin/model/catalog/product.php on line 201Warning: Cannot modify header information - headers already sent by (output started at /home/okmarket/public_html/admin/index.php:79) in /home/okmarket/public_html/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/okmarket/public_html/admin/index.php:79) in /home/okmarket/public_html/system/engine/controller.php on line 29

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Mon Sep 19, 2011 8:48 pm
by uksitebuilder
Either you are not waiting for the page to fully load before editing/saving or you have vqmod installed and need to edit the vqmod.php to tell usecache = true and logging = false.

Also possibly you need to increase memory and/or add a higher post_max_filesize value to your php.ini

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Mon Sep 19, 2011 11:22 pm
by okmarket
Hi Simon,

thank you for your kindly help. now I set memory_limit = 128M; and try it again, thank you very much.

have a nice day.

SOLVED: return products form bug

Posted: Thu Sep 22, 2011 2:05 am
by ddowdall
ninogui wrote:1511 localhost here

Bug

- On customer side, when entering the order history and choosing one order, customer selects one single line product and chooses to return it. Regardless of choosing one or more product lines all of them show up on the next screen for product return, meaning customer has to remove product lines that are not in fact to return ? I consider this a bug because on the first screen the customer is being asked what to do with the selected products

- Also apparently customer is able to issue the return for any qty product, even much more than he ever bought ?

thks
I have a solution to fix the 2 bugs in the return products form.

Topic 1: Trying to return a single product from an order

Scenario: While viewing a previous order the user checks a box next to a single product from the order and then selects return from the action dropdown menu.

Problem: All products in the order are loaded into the return form.

Solution: Pass the array of selected products from order controller to the return controller and then show only the selected products.

Open: catalog\controller\account\order.php

Find:

Code: Select all

 'product'    => $this->model_account_order->getOrderProducts($order_id)
Paste Above:

Code: Select all

  'selected'   => $this->request->post['selected'],

Open: catalog\controller\account\return.php

Find:

Code: Select all

foreach ($this->session->data['return']['product'] as $result) {
    $this->data['return_products'][] = array(
        'name'     => $result['name'],
        'model'    => $result['model'],
        'quantity' => 1,
        'opened'   => false,
        'comment'  => ''
    );
}

Replace with:

Code: Select all

foreach ($this->session->data['return']['product'] as $result) {				
  if (in_array($result['order_product_id'], $this->session->data['return']['selected'])) {
    $this->data['return_products'][] = array(
        'name'     => $result['name'],
        'model'    => $result['model'],
        'quantity' => 1,
        'opened'   => false,
        'comment'  => ''
    );
  }
}

Topic 2: Limit the returned quantity of a product to up-to the amount ordered:

Open:
/catalog/view/theme/yourTheme/template/account/return_form.tpl

Find:

Code: Select all

<input type="text" name="return_product[<?php echo $return_product_row; ?>][quantity]" value="<?php echo $return_product['quantity']; ?>" />
Replace With:

Code: Select all

              <select name="return_product[<?=$return_product_row;?>][quantity]" id="return_product[<?=$return_product_row?>][quantity]">
                <?php 
                  for ($i = 1; $i <= $return_product[quantity]; $i++) {
                      echo '<option value="'.$i.'">'.$i.'</option>';
                  }
                ?>
              </select>
Then Open:
/catalog/controller/account/return.php

Find:

Code: Select all

				$this->data['return_products'][] = array(
					'name'     => $result['name'],
					'model'    => $result['model'],
					'quantity' => 1,
					'opened'   => false,
					'comment'  => ''
				);

Replace With:

Code: Select all

				$this->data['return_products'][] = array(
					'name'     => $result['name'],
					'model'    => $result['model'],
					'quantity' => $result['quantity'],
					'opened'   => false,
					'comment'  => ''
				);

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Thu Sep 22, 2011 6:30 pm
by simon_wu
A minor miss in model/account/customer.php

When sending mail to the customer for created accounts the function uses the request-post instead of the inputed data.

Line 43:

Code: Select all

$mail->setTo($this->request->post['email']);
Should be:

Code: Select all

$mail->setTo($data['email']);
Minor problem for extensions/themes that create accounts with different input-names than the default register template.

Image not saved for validation

Posted: Tue Sep 27, 2011 5:26 pm
by Jaano
Bug confirmed on current 1.5.1 version : http://demo.opencart.com/admin/

In the admin when editing an item (product or category), your images selection is not kept when the form si submitted with errors (validation). Both for main image and additional images, though for different reasons. In the controller:

Code: Select all

if (isset($category_info) && $category_info['image'] && file_exists(DIR_IMAGE . $category_info['image'])) {
			$this->data['preview'] = $this->model_tool_image->resize($category_info['image'], 100, 100);
		} else {
			$this->data['preview'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
		}
missing the case when getting the image URL from request post.

Code: Select all

foreach ($product_images as $product_image) {
				if ($product_image['image'] && file_exists(DIR_IMAGE . $product_image['image'])) {
					$image = $product_image['image'];
				} else {
					$image = 'no_image.jpg';
				}
				
				$this->data['product_images'][] = array(
					'image'   => $image,
					'preview' => $this->model_tool_image->resize($image, 100, 100)
				);
			}
the image URL is directly in $product_image, not in $product_image['image'], in the request->post validation case.

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Wed Sep 28, 2011 4:26 am
by ddowdall
In version 1.5.1 when you add new customers in the admin, it does not verify that the email address has not been used before.

/index.php?route=sale/customer/insert

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Wed Sep 28, 2011 6:43 pm
by i2Paq
ddowdall wrote:In version 1.5.1 when you add new customers in the admin, it does not verify that the email address has not been used before.

/manage/index.php?route=sale/customer/insert
CONFIRMED on 1.5.1.3 also!

You can use that second account as well, it will "filter" on the password.

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Wed Sep 28, 2011 10:18 pm
by Daniel
simon_wu wrote:A minor miss in model/account/customer.php

When sending mail to the customer for created accounts the function uses the request-post instead of the inputed data.

Line 43:

Code: Select all

$mail->setTo($this->request->post['email']);
Should be:

Code: Select all

$mail->setTo($data['email']);
Minor problem for extensions/themes that create accounts with different input-names than the default register template.

fixed on next svn update

Re: Image not saved for validation

Posted: Wed Sep 28, 2011 10:21 pm
by Daniel
Jaano wrote:Bug confirmed on current 1.5.1 version : http://demo.opencart.com/admin/

In the admin when editing an item (product or category), your images selection is not kept when the form si submitted with errors (validation). Both for main image and additional images, though for different reasons. In the controller:

Code: Select all

if (isset($category_info) && $category_info['image'] && file_exists(DIR_IMAGE . $category_info['image'])) {
			$this->data['preview'] = $this->model_tool_image->resize($category_info['image'], 100, 100);
		} else {
			$this->data['preview'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
		}
missing the case when getting the image URL from request post.

Code: Select all

foreach ($product_images as $product_image) {
				if ($product_image['image'] && file_exists(DIR_IMAGE . $product_image['image'])) {
					$image = $product_image['image'];
				} else {
					$image = 'no_image.jpg';
				}
				
				$this->data['product_images'][] = array(
					'image'   => $image,
					'preview' => $this->model_tool_image->resize($image, 100, 100)
				);
			}
the image URL is directly in $product_image, not in $product_image['image'], in the request->post validation case.
fixed in svn.

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Wed Sep 28, 2011 10:22 pm
by Daniel
ok guy i need you to download the latest version of the svn and do some testing.

SVN download here:

http://code.google.com/p/opencart/source/checkout

please post any remaining bugs from the svn version here:

http://code.google.com/p/opencart/issues/list

I want to get the next release out soon. all new features are finished.

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Thu Sep 29, 2011 12:21 am
by i2Paq
3 issues reported! ;)

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Thu Sep 29, 2011 3:08 pm
by opencartrules
Wonderful, now it is very close! :)

Re: OpenCart 1.5.1.1 Bug Thread

Posted: Thu Sep 29, 2011 5:42 pm
by Daniel
i2Paq wrote:
ddowdall wrote:In version 1.5.1 when you add new customers in the admin, it does not verify that the email address has not been used before.

/manage/index.php?route=sale/customer/insert
CONFIRMED on 1.5.1.3 also!

You can use that second account as well, it will "filter" on the password.

fixed in svn.

Shipping name doesn't change when changing language

Posted: Thu Sep 29, 2011 10:01 pm
by Simplicity
Clean Opencart v1.5.1.2 install, default theme.

1. At least two languages needed for this. (choose any from extensions on opencart.com)
2. Put product which requires shipping calculation to cart. Canon EOS 5D in Desktops works fine.
3. Go to cart
4. Press "Estimate Shipping & Taxes" > Get Qoutes > Pick flat rate > Apply Shipping.
(Your shipping price will be added to total + you'll see a line "flat rate")
5. Change language from en to any other available and you'll see that "flat rate" stays in English.
6. Repeat step 4 and "flat rate" should change to other language (if translated).
7. Change language to en. Everything except shipping will change to English.

Re: Shipping name doesn't change when changing language

Posted: Thu Sep 29, 2011 11:54 pm
by Daniel
Simplicity wrote:Clean Opencart v1.5.1.2 install, default theme.

1. At least two languages needed for this. (choose any from extensions on opencart.com)
2. Put product which requires shipping calculation to cart. Canon EOS 5D in Desktops works fine.
3. Go to cart
4. Press "Estimate Shipping & Taxes" > Get Qoutes > Pick flat rate > Apply Shipping.
(Your shipping price will be added to total + you'll see a line "flat rate")
5. Change language from en to any other available and you'll see that "flat rate" stays in English.
6. Repeat step 4 and "flat rate" should change to other language (if translated).
7. Change language to en. Everything except shipping will change to English.

wasting my time with this. its unlikly people will change language after they have request a shipping quote. even so thats the quote they choose no matter what language its in.