Attempting to relocate the product section beneath the category sections within the sidebar of x-cart 5

Check out this website link:

I attempted to rearrange the best seller product section below the category section in the sidebar. I enabled Layout editor mode from the admin end, dragged the best seller products below the category sections, and saved it. It appeared to work, but upon refreshing the page, the best sellers were still showing at the top of the sidebar.

Trying a different approach, I moved the code for best selling products below the category section but nothing appeared on the page. My x-cart 5 site's homepage currently displays the most wanted products as best sellers in the sidebar. Interestingly, moving new arrivals below the category section worked fine, but the best seller section did not budge.

The best seller module in x-cart 5 only has one option to set how many products are displayed on the frontend. Below is the code snippet for displaying best seller products in the sidebar:

<div class="{{ this.getBlockClasses() }}">
  {% if this.getHead() %}
    <h3>MOST WANTED</h3>
    <div class="tag_line3">These are the hot sellers Look Below to see the most Wanted items on the site are.</div>
  {% endif %}
  <div class="content">{% include this.getBody() %}</div>
</div>

Any experts familiar with x-cart 5 who can assist me with this issue?

Answer №1

After some exploration, I have managed to tackle the challenge of moving div content with JavaScript. In my scenario, the solution looked something like this:

$('.block-bestsellers').insertAfter($('.block-flyout-categories-menu'));

If you are facing a similar issue, head over to your admin panel and navigate to ->look&feel->custom javascript. Paste the provided JavaScript code there, adjust the classes if necessary, and then save your changes.

Hope this helps!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The Angular component router-outlet is not recognized as a known element

I have encountered an error message: 'router-outlet' is not a known element: 1. If 'router-outlet' is an Angular component, then verify that it is part of this module. 2. If 'router-outlet' is a Web Component then add ...

What is the process for comparing two objects in TypeScript?

There is a unique class named tax. export class tax { private _id: string; private _name: string; private _percentage: number; constructor(id: string = "", taxName: string = "", percentage: number = 0) { thi ...

Avoid duplicate form submissions with jQuery

Issue: I am facing an issue with a script that allows users to press the keys C or M to choose an option. However, some users are pressing these keys multiple times even though each option can only be submitted once. Query: How can I prevent users from ...

Tips on creating a recursive function based on depth levels

Function in need of completion: public static function f($rows) { $str = '<ul>'; $level = 1; foreach($rows as $row) { if($row['section_level'] > $level) ...

What could be the reason behind the AJAX request not posting data to the controller?

I've been working on sending data to a controller using ajax, but instead of successfully posting the data, I keep getting redirected to a different URL. @section CustomScripts { <script type="text/javascript"> function ...

Dealing with vast amounts of data through jQuery ajax operations

Currently working on setting up a blog using asp.net, and I am seeking to utilize jquery for adding and displaying posts. However, I have concerns about whether it will function properly when dealing with large amounts of data. In the past, I encountered d ...

What is the best way to link various stylesheets to a Rails project?

In my project, I have a main stylesheet called application.css included in the layout file layouts/application.html.erb: <%= stylesheet_link_tag "application" %> However, there is a specific section of the website where I want to use a different st ...

Transform the NgRx Data updateOneInCache method to convert the class into an object

Whenever I call updateOneInCache, it seems like any class gets converted to an object. However, this issue doesn't occur when I use removeOneFromCache followed by addOneToCache. How can I resolve this problem specifically when working with updateOneIn ...

Angular's two-way binding feature does not seem to be updating the value for date

In my Angular - Dotnetcore 2.0 form, users are required to update their demographic information including their birth date. Initially, I was using the following code snippet to display the birthdate: <input id="dateOfBirth" type="date" class="form-cont ...

Can you identify the language of this HTML include code snippet?

Recently, I came across some .html files that include tags in a different format: [% INCLUDE '/path/to/footer.html' %] This bracket-and-percent-sign tag is unfamiliar to me. Does anyone know what it is used for? ...

Displaying XML data in an HTML table

Encountered a challenge while fetching data from an external XML document using JS. Following the w3schools tutorial for AJAX XML, but faced an issue I couldn't resolve. The XML structure is as follows: <root> <document-id> <author ...

What is causing my HTML script tag to not recognize my JS file in Next.js?

Just starting out with Next.js and trying to access the web cam for a project I'm working on, but encountering an issue when writing in the "script" tag. Below is the simple code for page.js: export default function Live(){ return( <html> ...

Saved links and navigating within an iFrame originating from a separate secure domain

Is it possible to execute a bookmarklet and enable navigation on an iFrame sourced from a different secure domain? For instance, suppose I have a webpage loaded from https://example.com, containing an iFrame with its source set to . Whenever I run the boo ...

Navigating between different pages using react-router-dom version 6.3

Currently in the process of refactoring a website and updating the rrd to v5, since the old version had components that no longer exist. We now need to work with the new component, as many are aware. Previously, I utilized framer-motion for transitioning ...

Troubleshooting Bootstrap: Issues persist even after including CDN links and reference style link // Python

Currently, I'm in the process of constructing my Django app. After successfully implementing the login page and homepage, I decided to give my page a much-needed facelift since it looked extremely basic. A big fan of Bootstrap, I've used it exten ...

Ensuring all Bootstrap columns have equal height to match the tallest one

I have several .col-md-2 elements on my Bootstrap website, each containing an image of varying height. I am looking to ensure that all the columns have the same height so that I can align the images horizontally. Below is the HTML code: <div class="r ...

Struggling with Debowerify in Grunt

After implementing debowerify in my project and configuring the transform in Gruntfile.js, I encountered an issue. Here's a snippet of the configuration: grunt.initConfig({ browserify: { app: { files: { 'publ ...

Transferring data from the backend to the frontend in Node.js through Express

How can I pass the IP variable retrieved from request.headers['x-forwarded-for'] in my server.js file to display it on my webpage index.html? I've attempted passing it within the <script> tag and even inside the <a> tag for immed ...

The object's texture remains static and does not follow its rotation

My simple object has a texture drawn onto it using a shader. Everything is working correctly, except when I rotate the object, the texture does not rotate along with it. Instead, it seems to remain in a 2D space, creating the 'mask' effect shown ...

"Unraveling the serialize() data from an ajax request in PHP: A step

I want to transfer form data to my php using ajax, but I'm facing issues with retrieving it correctly in my php code Here's the Ajax call: $(document).ready(function(){ $('#submit_comm').submit(function(){ let id = 's ...