Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Mobile wishlist looks squished, bad formatting

Subscriure's

Get notified when there's activity on this post

This question has been flagged
saaswishlistecommerceOdoo17Online
1391 Vistes
Avatar
Anthony

Hello All,

I am using Odoo 17 Online.

I realized today that the mobile wishlist page looks terrible. I updated the HTML so that the formatting was mobile friendly. Everything looks great, but when I try to click the add to cart or remove buttons on the mobile version it says:



I've looked over the code and I don't know where it's going wrong, can someone help? Here is the code below: It's got two sections, a table section for desktop views and a mobile version.

Template ID: website_sale_wishlist.product_wishlist


0
Avatar
Descartar
Anthony
Autor

Sorry, Odoo won't let me post the code without it displaying it, so stupid.....

<t name="Wishlist Page" t-name="website_sale_wishlist.product_wishlist">
<t t-call="website.layout">
<t t-set="additional_title">Shop Wishlist</t>
<div id="wrap" class="js_sale">
<div class="oe_structure" id="oe_structure_website_sale_wishlist_product_wishlist_1"/>
<div class="container oe_website_sale pt-3">
<section class="container wishlist-section">
<h3>My Wishlist</h3>
<div class="checkbox">
<label class="text-muted">
<input type="checkbox" id="b2b_wish" value="1" class="mr8"/>Add product to my cart but keep it in my wishlist
</label>
</div>
<!-- Existing table for desktop view -->
<table class="table table-bordered table-striped table-hover text-center mt16 table-comparator" style="table-layout:auto" id="o_comparelist_table">
<tbody>
<t t-foreach="wishes" t-as="wish">
<t t-set="combination_info" t-value="wish.product_id._get_combination_info_variant()"/>
<tr t-att-data-wish-id="wish.id" t-att-data-product-id="wish.product_id.id">
<td class="td-img align-middle">
<a t-att-href="wish.product_id.website_url">
<img t-att-src="'/web/image/product.product/%s/image_128' % (wish.product_id.id)" alt="Product image" class="img-fluid"/>
</a>
</td>
<td class="text-start align-middle">
<strong>
<a t-att-href="wish.product_id.website_url"><t t-esc="wish.product_id.display_name"/></a>
</strong>
<div class="product-internal-reference text-muted">
Model Number: <span><t t-esc="wish.product_id.default_code"/></span>
</div>
<button type="button" class="btn btn-link o_wish_rm no-decoration">
<small><i class="fa fa-trash-o"/> Remove</small>
</button>
</td>
<td class="align-middle o_wish_price" t-if="combination_info['prevent_zero_price_sale']">
<span t-field="website.prevent_zero_price_sale_text"/>
</td>
<td class="align-middle o_wish_price" t-else="">
<t t-out="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
<small t-if="combination_info['base_unit_price']" class="cart_product_base_unit_price d-block text-muted" groups="website_sale.group_show_uom_price">
<t t-call="website_sale.base_unit_price"><t t-set="product" t-value="wish.product_id"/></t>
</small>
</td>
<td class="text-center td-wish-btn align-middle">
<input name="product_id" t-att-value="wish.product_id.id" type="hidden"/>
<a t-if="combination_info['prevent_zero_price_sale']" t-att-href="website.contact_us_button_url" class="btn btn-primary btn_cta">Contact Us</a>
<button id="add_to_cart_button" t-else="" type="button" role="button" class="btn btn-secondary btn-block o_wish_add mb4">
Add <span class="d-none d-md-inline">to Cart</span>
</button>
</td>
</tr>
</t>
</tbody>
</table>

<!-- Mobile-specific layout -->
<div class="mobile-wishlist">
<t t-foreach="wishes" t-as="wish">
<t t-set="combination_info" t-value="wish.product_id._get_combination_info_variant()"/>
<div class="wishlist-card" t-att-data-wish-id="wish.id" t-att-data-product-id="wish.product_id.id">
<div class="wishlist-image">
<a t-att-href="wish.product_id.website_url">
<img t-att-src="'/web/image/product.product/%s/image_128' % (wish.product_id.id)" alt="Product image"/>
</a>
</div>
<div class="wishlist-info">
<strong>
<a t-att-href="wish.product_id.website_url"><t t-esc="wish.product_id.display_name"/></a>
</strong>
<div class="product-internal-reference text-muted">
Model Number: <span><t t-esc="wish.product_id.default_code"/></span>
</div>
<div class="align-middle o_wish_price" t-if="combination_info['prevent_zero_price_sale']">
<span t-field="website.prevent_zero_price_sale_text"/>
</div>
<div class="align-middle o_wish_price" t-else="">
<t t-out="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
<small t-if="combination_info['base_unit_price']" class="cart_product_base_unit_price d-block text-muted" groups="website_sale.group_show_uom_price">
<t t-call="website_sale.base_unit_price"><t t-set="product" t-value="wish.product_id"/></t>
</small>
</div>
<button type="button" class="btn btn-link o_wish_rm no-decoration">
<small><i class="fa fa-trash-o"/> Remove</small>
</button>
<input name="product_id" t-att-value="wish.product_id.id" type="hidden"/>
<a t-if="combination_info['prevent_zero_price_sale']" t-att-href="website.contact_us_button_url" class="btn btn-primary btn_cta">Contact Us</a>
<button id="add_to_cart_button" t-else="" type="button" role="button" class="btn btn-secondary btn-block o_wish_add mb4">
Add to Cart
</button>
</div>
</div>
</t>
</div>
</section>
</div>
</div>
</t>
</t>

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Events Visibility to Different Portal Groups
saas Online
Avatar
0
d’ag. 24
1474
Decimals in Pricing
Odoo17 Online
Avatar
Avatar
2
de juny 24
3372
Ecommerce Wishlist
wishlist ecommerce
Avatar
Avatar
1
de febr. 24
5321
Reading system parameter from website_sale.confirmation template in Odoo 17 Enterprise Solved
Enterprise Odoo17 Online
Avatar
Avatar
1
de febr. 25
3598
Access backend models fields from frontend template
Enterprise Odoo17 Online
Avatar
0
de nov. 24
1962
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now