Jump to content

Austra02

Members
  • Posts

    35
  • Joined

  • Last visited

Profile Information

  • Location
    Sydney, Australia
  • Activity
    User/Merchant

Recent Profile Visitors

3,139,145 profile views

Austra02's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. Thank you SO much for all your help! REALLY appreciate the assistance and awesome help. I'll implement this today and let you know how it goes. Thanks again, Scott..
  2. Thanks for all your help. Here is the same named .php file: <?php if (!defined('_PS_VERSION_')) exit; class Tmproductlistgallery extends Module { public function __construct() { $this->name = 'tmproductlistgallery'; $this->tab = 'front_office_features'; $this->version = '1.0.0'; $this->author = 'Template Monster (Alexander Grosul)'; $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('TM Product List Gallery'); $this->description = $this->l('Show all images of product on product listing'); $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); } public function install() { return parent::install() && $this->registerHook('header') && $this->registerHook('displayProductListGallery'); } public function uninstall() { return parent::uninstall(); } public function hookHeader() { $this->context->controller->addJS($this->_path.'/js/front.js'); $this->context->controller->addCSS($this->_path.'/css/front.css'); } public function hookDisplayProductListGallery($params) { $product = new Product($params['product']['id_product']); $this->smarty->assign(array( 'product_images' => $product->getImages($this->context->language->id), 'product' => $params['product'], )); return $this->display(__FILE__, 'views/templates/hooks/tmproductlistgallery.tpl'); } } Cheers, Scott.
  3. I did find this in the default Modules folder: tmproductlistgallery.tpl This contains the following code (think this is getting close?): {if count($product_images) > 1} <ul class="gallery-thumb-list"> {foreach from=$product_images item=image name=image} {assign var=imageId value="`$product.id_product`-`$image.id_image`"} {if !empty($image.legend)} {assign var=imageTitle value=$image.legend|escape:'html':'UTF-8'} {else} {assign var=imageTitle value=$product.name} {/if} <li id="thumb-{$product.id_product}-{$image.id_image}" class="gallery-image-thumb{if $image.cover == 1} active{/if}"> <a href="{$product.link|escape:'html':'UTF-8'}" title="{$imageTitle}" data-href="{$link->getImageLink($product.link_rewrite, $imageId, 'tm_home_default')|escape:'html':'UTF-8'}"> <img class="img-responsive" id="thumb-{$image.id_image}" src="{$link->getImageLink($product.link_rewrite, $imageId, 'tm_cart_default')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}" itemprop="image" /> </a> </li> {/foreach} </ul> {/if} Cheers, Scott.
  4. Okay, that makes sense. The only module that is using that hook is the TM Product List Gallery v1.0.0 - by Template Monster (which makes sense given it's a Template Monster theme). That module has no configuration options (see screen capture below) however, and the product-list.tpl I posted above is that theme's tpl file. Also, there is no module called by that name. The only module I have in that theme's modules is: blockcategories Thanks for the help and any other thoughts on how to limit the number of images on that tpl file, for each product? Cheers, S.
  5. Thanks. Yes, I realised it wasn't a default feature and would probably need some modification to the tpl file. I've pasted it below. Thanks in advance if you can provide any suggestions. Cheers, Scott. {if isset($products) && $products} {*define number of products per line in other page for desktop*} {if $page_name !='category'} {if ($hide_left_column || $hide_right_column) && ($hide_left_column !='true' || $hide_right_column !='true')} {* left or right column *} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=2} {elseif ($hide_left_column && $hide_right_column) && ($hide_left_column =='true' && $hide_right_column =='true')} {* no columns *} {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} {else} {* left and right column *} {assign var='nbItemsPerLine' value=2} {assign var='nbItemsPerLineTablet' value=1} {assign var='nbItemsPerLineMobile' value=2} {/if} {else} {* category page *} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=2} {/if} {*define numbers of product per line in other page for tablet*} {assign var='nbLi' value=$products|@count} {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet} <!-- Products list --> <ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}"> {foreach from=$products item=product name=products} {math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo} {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet} {math equation="(total%perLineM)" total=$smarty.foreach.products.total perLineM=$nbItemsPerLineMobile assign=totModuloMobile} {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if} {if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if} {if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if} <li class="ajax_block_product col-xs-12 col-sm-{12/$nbItemsPerLineTablet} col-md-{12/$nbItemsPerLine}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}"> <div class="product-container" itemscope itemtype="http://schema.org/Product"><div class="productInner"> <div class="left-block"> <div class="product-image-container"> <a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url"> <img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'tm_home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" itemprop="image" /> {hook h="displayProductListImages" product=$product} </a> {hook h='displayProductListGallery' product=$product} {if isset($quick_view) && $quick_view} <a class="quick-view" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}"> <span>{l s='Quick view'}</span> </a> {/if} {if isset($product.new) && $product.new == 1} <a class="new-box {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} with_sale{/if}" href="{$product.link|escape:'html':'UTF-8'}"> <span class="new-label">{l s='New'}</span> </a> {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <a class="sale-box" href="{$product.link|escape:'html':'UTF-8'}"> <span class="sale-label">{l s='Sale!'}</span> </a> {/if} {if (!$PS_CATALOG_MODE && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div class="content_price_2"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} {if $product.specific_prices.reduction_type == 'percentage'} <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span> {/if} {/if} {/if} </div> {/if} </div> {hook h="displayProductDeliveryTime" product=$product} {hook h="displayProductPriceBlock" product=$product type="weight"} </div> <div class="right-block"> <h5 itemprop="name"> {if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if} <a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" > <span class="list-name">{$product.name|truncate:100:'...'|escape:'html':'UTF-8'}</span> <span class="grid-name">{$product.name|truncate:30:'...'|escape:'html':'UTF-8'}</span> </a> </h5> <p class="product-desc" itemprop="description"> <span class="list-desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</span> <span class="grid-desc">{$product.description_short|strip_tags:'UTF-8'|truncate:40:'...'}</span> </p> {if (!$PS_CATALOG_MODE && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="content_price"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <span itemprop="price" class="price product-price{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} product-price-new{/if}"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> <meta itemprop="priceCurrency" content="{$currency->iso_code}" /> {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} {hook h="displayProductPriceBlock" product=$product type="old_price"} <span class="old-price product-price"> {displayWtPrice p=$product.price_without_reduction} </span> {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"} {if $product.specific_prices.reduction_type == 'percentage'} <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span> {/if} {/if} {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="unit_price"} {/if} </div> {/if} {hook h='displayProductListReviews' product=$product} <div class="button-container"> {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} {if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)} {capture}add=1&amp;id_product={$product.id_product|intval}{if isset($static_token)}&amp;token={$static_token}{/if}{/capture} <a class="ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity > 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}"> <span>{l s='Add to cart'}</span> </a> {else} <span class="ajax_add_to_cart_button btn btn-default disabled"> <span>{l s='Add to cart'}</span> </span> {/if} {/if} </div> {if isset($product.color_list)} <div class="color-list-container">{$product.color_list}</div> {/if} <div class="product-flags"> {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.online_only) && $product.online_only} <span class="online_only">{l s='Online only'}</span> {/if} {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <span class="discount">{l s='Reduced price!'}</span> {/if} </div> {if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)} <span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability"> {if ($product.allow_oosp || $product.quantity > 0)} <span class="{if $product.quantity <= 0 && !$product.allow_oosp}out-of-stock{else}available-now{/if}"> <link itemprop="availability" href="http://schema.org/InStock" />{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock'}{/if}{else}{l s='Currently Out of Stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if} </span> {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)} <span class="available-dif"> <link itemprop="availability" href="http://schema.org/LimitedAvailability" />{l s='Product available with different options'} </span> {else} <span class="out-of-stock"> <link itemprop="availability" href="http://schema.org/OutOfStock" />{l s='Currently Out of Stock'} </span> {/if} </span> {/if} {/if} <div class="functional-buttons clearfix"> {hook h='displayProductListFunctionalButtons' product=$product} {if isset($comparator_max_item) && $comparator_max_item} <div class="compare"> <a class="add_to_compare" href="{$product.link|escape:'html':'UTF-8'}" data-id-product="{$product.id_product}" title="{l s='Add to Compare'}"><span>{l s='Add to Compare'}</span></a> </div> {/if} <div class="moreBox {if (isset($product.customization_required) && $product.customization_required)}customize{/if}"> <a itemprop="url" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='More Information'}">{l s='More Info'} <span>{if (isset($product.customization_required) && $product.customization_required)}{l s='Customize'}{else}{l s='More'}{/if}</span> </a> </div> </div> </div> </div></div><!-- .product-container> --> </li> {/foreach} </ul> {addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL} {addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL} {addJsDef comparator_max_item=$comparator_max_item} {addJsDef comparedProductsIds=$compared_products} {addJsDef nbItemsPerLine=$nbItemsPerLine} {addJsDef nbItemsPerLineTablet=$nbItemsPerLineTablet} {addJsDef nbItemsPerLineMobile=$nbItemsPerLineMobile} {/if}
  6. Hello, I've got a product that has Combinations and a total of 28 images. Problem is that on the parent category page (and when viewing in List View), ALL 28 images are displaying in one long column and this makes the category page look really bad, as the images run way down the page. Please see: https://glindawand.com.au/36-divinity-foundation-by-glindawand and change the page to List View. The first product on the page is what I'm talking about. Is there a way to set the number of images displayed on Category pages to only 6 images for ALL products? I'm assuming this would be done on the product-list.tpl page? Any help would be greatly appreciated. Cheers, Scott.
  7. WOW! Thanks so much!! The only thing is I must admit I have no idea how to add a 'loop' into the stores.js. Are you able to help with this? Thanks again; I really appreciate this! Cheers, Scott.
  8. Hi All, I've got a strange issue with my 'Store Contacts' not showing some stores when a Postal Code search is done - even if the exact same postal code as a store is used for the search. I'm using: 1.6.1.11 Others stores display okay, but some don't. All the settings for the stores not displaying are correct; there are no strange characters in the setting for the store, but it just won't display. I've set the Store Contacts to one store that works and one that doesn't to show this issue: https://glindawand.com.au/stores If a postal code search is performed for 2009, it shows no stores, even though I have a store registered with a postal code of 2009. If you change the search to 2015, it works. If a search for 4006 (the postal code of the other store), it shows up correctly. I've done all the usuals as well: cleared the cache; turned on recompiled, etc., but nothing is working. I hope someone can help with this, as my retailers are getting annoyed when their store doesn't display. Thanks in advance, Scott.
  9. Does anyone have a suggestion for this? Surely it can't be that strange a request???
  10. Hello, I need to create a product that a customer can add some text to (i.e. a customisation), that will alter the final price if they select this option. Essentially, we have gold-plated makeup brushes that we want to now offer personal engraving for. This would require a text box and (if possible) be set to a max of 20 characters. If they select this customisation, this should add $10 to the price of the brush. If they choose not to select this, the brush price will not change. Is there a way (or a module) to achieve this? I have looked at some modules, but they are rather vague in their description, so I'm still not 100% sure if they will suffice. It would of course be preferable if this can be achieved natively in PS. Any help would be greatly appreciated. Cheers, Scott.
  11. Hi All, I'm running PrestaShop version 1.6.1.11 with the following server information: ~Server information Linux #1 SMP Debian 3.2.54-2 x86_64 ~Server software version Apache/2.2.22 (Debian) ~PHP version 5.5.38-1~dotdeb+7.1 ~Memory limit 128M ~Max execution time 120 I'm also running a Template Monster theme (theme1206) and have the Bank Wire payment module configured/ Whenever the Bank Wire module is used by a customer, upon them clicking 'Confirm my payment', they get redirected to the \modules\bankwire\validation.php page with nothing but 'Fatal Error' on the top of the page. I've tried completely uninstalling (delete) the Bankwire module and reinstalling (also using the latest module from GitHub), but nothing seems to work. I've also enabled: define('_PS_MODE_DEV_', true); but nothing is written to my log file. All that happens after turning DEV mode on is that I get the validation.php page displaying over 65,000 lines. This is causing me major issues as lots of customers here in Australia like to use bank wire payment method. Can someone PLEASE help me with this? Cheers, Scott
  12. Hi Everyone, I've got a strange SMTP issue that is causing major headaches... I'm running PS1.6.1.4 and I'm using SMTP in 'Advanced Parameters > E-mail' as the PHP mail() function on my server (Cloudways) is having issues (that's another story and I have a ticket open with Cloudways on that one). Anyway, I set the SMTP settings pointing to my admin email account on my cPanel email hosting and all saves properly and when I send a test email from the Prestashop 'Advanced Parameters > E-mail' page, it sends properly and I get the email no problems. Looking good so far. However - and here is where it gets weird... if I try and re-send a status email to a customer regarding their order; or, I try and update the status of a customer's order with a status that sends an email, it all fails with the error: "An error occurred while sending the e-mail to the customer." (please see screen capture). When updating a customer status it errors and indicates that it can't change the status because the email couldn't be sent to the customer. When I go back into the order, the status has been updated, but the customer doesn't receive the email. Unfortunately, the error doesn't give any indication as to why it failed. As I understand it, by setting the SMTP, both the test email (that is successfully sent) and the customer status emails would both use exactly the same SMTP settings??? If this is the case, this should not be happening, correct??? Has anyone else seen this, or experienced similar? Does anyone have any thoughts on how I could troubleshoot this issue? Unfortunately, I'm due to go live with this site this weekend (3 days), so it is rather important :-) So any help would be greatly appreciated. Thanks in advance for any assistance. Scott.
  13. Hi there, I'm running PS 1.6.0.11 and have tried to get multistores up and running. That was a disaster and I need to delete all the info within there. Namely, the store URL(s) and the Shops themselves, within the Default group. After much looking around, I can find anywhere to do this. Further, even if I create another shop group, it never shows up in the dropdown for the group to add a new store to???? If anyone can help with the main issue at the moment of deleting all my multistore Shops and shop URLs, so I can start again from scratch; that would be greatly appreciated. Cheers, Scott.
  14. Thanks for the input - I appreciate it. It appears to be rare these days in this forum :-( so thanks again. It turned out to actually be an issue with the last version of PS (1.5.3.1). There was a bug fix in the new release (1.5.4.0) that addressed this exact issue and once I applied the upgrade, all sorted. Thanks again.
×
×
  • Create New...