Jump to content

raulahol

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Location
    Valencia
  • Activity
    Developer

raulahol's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Hi, I was reading this forum and try that you post but...there is a litle mistake at SQL to get the real image URL You say that the URL is: concat( , ifnull( conf.value, 'siteaddress.ro' ) , '/img/p/',mid(p.id_product,1,1),'/', if (length(p.id_product)>1,concat(mid(p.id_product,2,1),'/'),''),if (length(p.id_product)>2,concat(mid(p.id_product,3,1),'/'),''),if (length(p.id_product)>3,concat(mid(p.id_product,4,1),'/'),''),if (length(p.id_product)>4,concat(mid(p.id_product,5,1),'/'),''), p.id_product, '.jpg' ) AS url_image But the id of the product isn't the id to form the image url for this is better: concat( 'http://my-URL.com/img/p/',mid(im.id_image,1,1),'/', if (length(im.id_image)>1,concat(mid(im.id_image,2,1),'/'),''),if (length(im.id_image)>2,concat(mid(im.id_image,3,1),'/'),''),if (length(im.id_image)>3,concat(mid(im.id_image,4,1),'/'),''),if (length(im.id_image)>4,concat(mid(im.id_image,5,1),'/'),''), im.id_image, '.jpg' ) AS url_image And the SQL maybe like this: SELECT p.id_product AS 'ID', pl.id_lang AS 'ID_LANG', p.active AS 'Active (0/1)', pl.name AS 'Name', p.id_category_default AS 'Default Category', p.price AS 'Price tax excl.', p.id_tax_rules_group AS 'Tax rules ID', p.wholesale_price AS 'Wholesale price', p.on_sale AS 'On sale (0/1)', p.reference AS 'Reference #', p.quantity AS 'Quantity', pl.description_short AS 'Short description', pl.description AS 'Description', pl.meta_title AS 'Meta-title', pl.meta_keywords AS 'Meta-keywords', pl.meta_description AS 'Meta-description', pl.link_rewrite AS 'URL rewritten', pl.available_now AS 'Text when in stock', pl.available_later AS 'Text when backorder allowed', p.available_for_order AS 'Available for order', p.date_add AS 'Product creation date', p.show_price AS 'Show price', p.online_only AS 'Available online only', p.condition AS 'Condition', concat( 'http://my-URL.com/img/p/',mid(im.id_image,1,1),'/', if (length(im.id_image)>1,concat(mid(im.id_image,2,1),'/'),''),if (length(im.id_image)>2,concat(mid(im.id_image,3,1),'/'),''),if (length(im.id_image)>3,concat(mid(im.id_image,4,1),'/'),''),if (length(im.id_image)>4,concat(mid(im.id_image,5,1),'/'),''), im.id_image, '.jpg' ) AS url_image FROM ps_product p INNER JOIN ps_product_lang pl ON p.id_product = pl.id_product LEFT JOIN ps_image im ON p.id_product = im.id_product WHERE 1=1 and p.active = 1 I hope it help you. You can find this info at http://blog.raularin.com/exportar-productos-con-imagen-en-pestashop/
  2. Buenas, quiero recortar el número de subcategorías que aparecen en el topmenu para la versión móvil. La web es lookmaterial.com, como se puede ver, para la versión web los submenús únicamente muestran las primeras subcategorías, sin embargo, en la versión móvil aparecen más subcategorías. Hay alguna forma de acortar las subcategorías mostradas en la versión móvil ? o acortar en general. Saludos
×
×
  • Create New...