Post by terrynshed » Thu Mar 01, 2012 5:24 pm

Hi,

This is a great vqmod and exactly what I was looking for. Though I can not seem to get it to work. I'm using 1.5.1.3 and simply installed the XML file into my vqmod folder. I did not see any places I needed to change anything due to my slightly modified theme.

As soon as I applied the vqmod, all of my products give me the same error when I try to click on the link from the catalog page:

Parse error: syntax error, unexpected T_ELSE, expecting T_FUNCTION in /home/smallpar/public_html/new/vqmod/vqcache/vq2-catalog_controller_product_product.php on line 787

I spent a bit of time looking through the product.php file, but could not see anything obvious. Not really sure what to look for either.

Does anyone know what might be the problem?

Thanks.

New member

Posts

Joined
Fri Jan 20, 2012 5:35 pm

Post by lokust » Fri Mar 09, 2012 5:44 am

Fantastic! thanks Simon - great bit of code.
One thing I noticed is that the image used on category page is no longer visible on the product page. Would it be possible to add that original image into the Photos tab so that customer can keep it as reference?

Just re-reading the post title I feel like a bit of a dick as that's the point but anyhow - is it possible to retain the image?
Also noticed that this results in PHP errors if there isn't a 2nd image.
Undefined variable: images in /catalog/view/theme/shoppica/template/product/product.tpl on line 199
Line 199

Code: Select all

$this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));

Newbie

Posts

Joined
Fri Jun 24, 2011 9:26 pm

Post by JasonF » Fri Jul 26, 2013 7:32 pm

Anyone got this working on 1.5.5.1?

I've tried various edits but can't get it to work right.

Thanks,

Jason

New member

Posts

Joined
Sat Oct 01, 2011 12:46 am

Post by ultimato » Fri Dec 06, 2013 9:54 pm

Hey someone help me i have version 1.5.6 dosent work for this version but i need to do this ....

Newbie

Posts

Joined
Fri Dec 06, 2013 9:53 pm

Post by snoopster » Thu Jul 23, 2015 5:12 am

If anyone needs it, here is the working code for v2.x opencart:

Code: Select all

$this->load->model('tool/image');

         $results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);

         if(count($results)==0){
            if ($product_info['image']) {
               $data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));
            } else {
               $data['popup'] = '';
            }

            if ($product_info['image']) {
               $data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));
            } else {
               $data['thumb'] = '';
            }
         }else{

            $data['images'] = array();
            $im = 0;
            foreach ($results as $result) {
               $im++;
               if($im>1){
                  $data['images'][] = array(
                     'popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')),
                     'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height'))
                  );
               }else{
                  $data['popup'] = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height'));
                  $data['thumb'] = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height'));
               }
            }

         }

New member

Posts

Joined
Mon Nov 28, 2011 7:06 am

Post by BriteLightLEDs2014 » Sat Aug 27, 2016 6:57 pm

needing this for V1.6 please?

Active Member

Posts

Joined
Wed Aug 20, 2014 3:59 am
Who is online

Users browsing this forum: No registered users and 35 guests