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.
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.
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.
Line 199Undefined variable: images in /catalog/view/theme/shoppica/template/product/product.tpl on 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'));
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'));
}
}
}
Who is online
Users browsing this forum: No registered users and 35 guests