Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

QuickViews Problem

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-31-2015, 11:41 AM
  GlasPak's Avatar 
GlasPak GlasPak is offline
 

eXpert
  
Join Date: May 2015
Posts: 241
 

Default QuickViews Problem

I am not sure why but our "quickviews" for the products are just displaying a URL for "more details" that takes you to the actual page. I need to put in here some text (Pieces per Case) so that it shows up in quickviews.

http://glaspak.com/bormioli-fido-jars
For example the Fido 200 ml Terrine Hermetic Jar.

Edit:
I am trying to modify quicklook to add a new class


<li class="ppc-field">
<span class="name">{t(#Pieces Per Case#)}</span>
<span class="ppc-field-value">{item.product.getPPCField()}</span>
</li>

But I can't figure out where any reference to quicklook are (all Quicklook gives is a link that says "More details")
__________________
Business License
https://glaspak.com
GoDaddy VPS - Apache with WHM
2GB ECC DDR3 1600MHz
2x Intel E5-2630L v2 Hex Core 2.4/2.8ghz
15 MB proc cache
60 GB 10k RPM hdd
PHP 7.0.15
MariaDB 10.1.21 with InnoDB engine
Reply With Quote
  #2  
Old 09-01-2015, 05:25 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: QuickViews Problem

Quickviews don't show product descriptions in X-Cart 5 out of the box. The popup block is too small for the description to fit in there.

However, with a small custom module you can make the description appear in Quicklooks too. To do this you should add the skins/default/en/product/details/parts/common.product-title.tpl template into the "product.details.quicklook.info" list with the height parameter set to 18 (out of the box the template goes into the "product.details.page.info" list only).
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 09-01-2015, 05:36 AM
  GlasPak's Avatar 
GlasPak GlasPak is offline
 

eXpert
  
Join Date: May 2015
Posts: 241
 

Default Re: QuickViews Problem

I followed this http://kb.x-cart.com/display/XDD/Adding+new+property+to+a+product to create a new field in which I have item.ppc-field.tpl for the invoice

Can I just add that instead?

Edit: I edited my item.ppc-field.tpl

Quote:
{* vim: set ts=2 sw=2 sts=2 et: *}
{**
* @ListChild (list="invoice.item.name", weight="20")
* @ListChild (list="product.details.quicklook.info", weight="20")
*}
<li class="ppc-field">
<span class="name">{t(#Pieces Per Case#)}</span>
<span class="ppc-field-value">{item.product.getPPCField()}</span>
</li>

And all it did was break quicklook.
__________________
Business License
https://glaspak.com
GoDaddy VPS - Apache with WHM
2GB ECC DDR3 1600MHz
2x Intel E5-2630L v2 Hex Core 2.4/2.8ghz
15 MB proc cache
60 GB 10k RPM hdd
PHP 7.0.15
MariaDB 10.1.21 with InnoDB engine
Reply With Quote
  #4  
Old 09-01-2015, 07:51 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: QuickViews Problem

It should be just "{product.getPPCField()}" for the "product.details.quicklook.info" list, not "{item.product.getPPCField()}".
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
GlasPak (09-01-2015)
  #5  
Old 09-01-2015, 09:06 AM
  GlasPak's Avatar 
GlasPak GlasPak is offline
 

eXpert
  
Join Date: May 2015
Posts: 241
 

Default Re: QuickViews Problem

Quote:
Originally Posted by qualiteam
It should be just "{product.getPPCField()}" for the "product.details.quicklook.info" list, not "{item.product.getPPCField()}".

What if the value is null?

Got it to work but any attempt at trying to have it ignored if the value of product.getPPCField() is zero length failed miserably!
__________________
Business License
https://glaspak.com
GoDaddy VPS - Apache with WHM
2GB ECC DDR3 1600MHz
2x Intel E5-2630L v2 Hex Core 2.4/2.8ghz
15 MB proc cache
60 GB 10k RPM hdd
PHP 7.0.15
MariaDB 10.1.21 with InnoDB engine
Reply With Quote
  #6  
Old 09-02-2015, 12:43 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: QuickViews Problem

Try this one:
PHP Code:
...
<
li class="ppc-field" IF="product.getPPCField()">
  <
span class="name">{t(#Pieces Per Case#)}</span>
  
<span class="ppc-field-value">{product.getPPCField()}</span>
</
li>                      
... 
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #7  
Old 09-02-2015, 06:47 AM
  GlasPak's Avatar 
GlasPak GlasPak is offline
 

eXpert
  
Join Date: May 2015
Posts: 241
 

Default Re: QuickViews Problem

Quote:
Originally Posted by qualiteam
Try this one:
PHP Code:
...
<
li class="ppc-field" IF="product.getPPCField()">
  <
span class="name">{t(#Pieces Per Case#)}</span>
  
<span class="ppc-field-value">{product.getPPCField()}</span>
</
li>                      
... 

Trying to understand this before I implement... What does IF="product.getPPCField()" do? I can't find documentation on it.

Also I am guessing I can change li to div (don't want it in a list).
__________________
Business License
https://glaspak.com
GoDaddy VPS - Apache with WHM
2GB ECC DDR3 1600MHz
2x Intel E5-2630L v2 Hex Core 2.4/2.8ghz
15 MB proc cache
60 GB 10k RPM hdd
PHP 7.0.15
MariaDB 10.1.21 with InnoDB engine
Reply With Quote
  #8  
Old 09-02-2015, 07:06 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: QuickViews Problem

This means the tag should be displayed only if the function returns TRUE or a data that PHP would cast into TRUE. NULL turns into FALSE, so the LI tag won't be rendered for products with getPPCField() being NULL.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #9  
Old 09-02-2015, 07:19 AM
  GlasPak's Avatar 
GlasPak GlasPak is offline
 

eXpert
  
Join Date: May 2015
Posts: 241
 

Default Re: QuickViews Problem

Quote:
Originally Posted by qualiteam
This means the tag should be displayed only if the function returns TRUE or a data that PHP would cast into TRUE. NULL turns into FALSE, so the LI tag won't be rendered for products with getPPCField() being NULL.

It didn't work... Is it possible it is a 0 length instead of null? Is there a way for it to assume null and zero length = False?

This is what I used

PHP Code:
<div class="ppc-field" IF="product.getPPCField()">
      <
b>
      <
span class="name">{t(#Pieces Per Case: #)}</span>
      
<span class="ppc-field-value">{product.getPPCField()}</span>
      </
b>
  <
div
__________________
Business License
https://glaspak.com
GoDaddy VPS - Apache with WHM
2GB ECC DDR3 1600MHz
2x Intel E5-2630L v2 Hex Core 2.4/2.8ghz
15 MB proc cache
60 GB 10k RPM hdd
PHP 7.0.15
MariaDB 10.1.21 with InnoDB engine
Reply With Quote
  #10  
Old 09-02-2015, 08:07 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: QuickViews Problem

What is in product.getPPCField() when it doesn't work?
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:42 PM.

   

 
X-Cart forums © 2001-2020